server: Clone file_get_sd() and file_set_fd() for directories.