[package] Nuke corrupted git checkouts and try again

If a git checkout is corrupt (or probably corrupt), delete it and
try to check it out again. If it still fails, then maybe the error
is real.