readdir implementation.