Implemented readdir and added tests