Fixed tests and script on windows
minor tweaks to get tests to work on both windows and *nix