Add support for readdir call and get rid of basename() calls for file ops