fixed bug with POSIX DirectoryIterator()