Implement opendir and closedir

TODO: readdir