get_directory muset raise an exception if no parent