Use new posix_readdir API