Make reinstall transaction safe.

* Aborting during reinstall will now restore the originally installed keg.