Windows client tests, mostly

Patches to make windows client tests work.