Improve the Travis CI script

Currently, we run the python generation and fix tasks on travis-ci. This means that formatting issues go unnoticed and the generated python code is either left outdated in the repo, or the tests fail mysteriously (to the new user) once they get run on Travis CI.

We could also do with documentation for what to do if the python api changes by mistake (or needs to change), but that's for another issue, I guess.