Execute in a temp dir via subshell; halt on errors

I've looked at your tool, but had no phantomjs2 yet.

But I've done some fixes to the script, especially not `rm`'ing any files in the current directory anymore.