add win32 support for spaces in test command

This should fix the code in the previous commit to support win32 platforms.
Based on code from: https://github.com/joyent/node/blob/v0.11.13/lib/child_process.js#L599
Also, switched from `bash` to `/bin/sh` to be even more universal for unix-based platforms.