Unittest setup refactor

Take a screenshot when the unittests fail when they're run by the integration tests (I had a test fail in casper but not FF/Chrome). I gave a bunch of stuff names in `casper.js` since I had trouble understanding it when I was debugging something.