working set up for travis builds

I also adjusted the build scripts a bit so they'll fail earlier when something goes wrong.

Here's the passing build from my fork https://travis-ci.org/glenjamin/mori/builds/29797989