Fix Windows detection and set command correctly

The previous regular expression /win/ was matching "darwin" when
on Mac, so change that to only match when on Windows.

Also correctly set the mocha command which is passed to "cmd.exe /c"
to the mocha coming either from configuration, environment variable,
or from the installed mocha module.