Break get_current_version into its own function.

Also add spec to check that the install action doesn't do an upgrade.
Fix a typo and remove a couple unused variables