Test Readdir.
Remove dead code, cleanup.