simplify the upgrade logic to only look at downloaded files, expand the tests.