added a rename method to directory struct.