Further fixes for Win32 tests

This contains further fixes for tests on Win32 and allows the tests to pass on that platform (which also fixes [bug #83631](https://rt.cpan.org/Public/Bug/Display.html?id=83631)).