* lib/fts.c (fts_build): readdir(3) returns NULL when finished,
but also upon error when it will also set errno. Therefore
flag the error case from readdir(). We treat the case where
no items are read the same as if the dir can't be accessed,
i.e. by setting fts_errno to FTS_DNR.
The bug was initially reported by Peter Benie
http://bugzilla.opensuse.org/show_bug.cgi?id=984910
where it was mentioned that readdir() may fail
when an NFS server has a poor readdir cookie implementation.