Convert Unix paths to Windows format under Cygwin

I've encountered the same problem as raised in issue #78, Unix style paths being passed to non-Cygwin binaries such as CScript.exe or node.js which then fail because of this.

This is a tidied up version of the code that they suggested which detects when running under a Cygwin environment and then uses the cygpath binary to convert the Unix style path to the temporary script file to its Windows equivalent.

If you would prefer the path conversion to occur in a different place in the code I'm very happy to adjust as required.