GitPreparer now registers a "priority" register_shutdown_function callback in order to clean up in case of a fatal error.