minor fixes to return codes of closedir, telldir
Merge pull request #1372 from inolen/dirent_fixes

minor fixes to return codes of closedir, telldir