Use stat call to distinguish between files and directories for file systems that do not support d_type.
Use stat for all unknown file entries
Merge pull request #369 from adobe/rlim/readdir-issue

Use stat on file systems that do not support d_type in file entry record returned from readdir.