add opendir, readdir, closedir functionality