Fix update failing if the git repository at temp path is broken