Rethrow exception for create_directory function.