break out the upgrade check logic from the paths in order to test it in a lua test fixture.