Integrate unit tests with Travis CI and add pre-commit hook