Add Travis CI integration and a pre-commit hook