Fix testsuite, closes #4174

In case of `lifecycle-signal.js` which tests for the POSIX event `SIGSEGV` just return early if we are on windows, but maybe someone knows a better solution.

`prepublish.js` uses a Regex and is a little bit more flexible about the output regarding line-endings.