move dirent's functions in a new module 'dirent'
add O_DIRECTORY flag
add new methods in fd.Directory