/tmp/pip-build fixes (revisions to pull #734)

a few fixes on top of pull #734, mainly to get the tests to pass on windows