Improve tests

- Exit with non-zero exit code if the tests failed
- Add in travis yaml