Windows fixes

Unfortunately, this is not exhaustive - particularly hive tests still fail due to path issues.