factors out setName method on DirectoryDescriptor