Readdir

Replace hazardous readdir.