Add Windows support for unit tests

@rpialum I've moved your Windows-related changes into this PR.

I admit I'm not too fond of this approach, since it requires having a parallel python script whereas I would prefer to just keep everything in a single script. There must be a way to use `path.separator` or something to avoid the forward-slash/backslash issue in *nix vs. Windows.