Fixes for tests to prevent unintentional errors under MSWin32