Fix tests on win64

These commits fix all tests and installation utilities on win64. I've confirmed that these are a green build on the bots.
Also note that this script is only run by the automation, not part of the normal make process.