fix tests on OSX

today when running the tests for the first time on OSX, I ran into quite a few errors. they might fix some linux tests as well, but I didn't check.

the only remaining improvement is that nwsnapshot isn't normally in one's path and its location could be be found from process.cwd (assuming you compiled the source)

node-webkit is great!