Align readdir() a bit more with POSIX.