Refactoring the travis scripts to allow easier extension.

Done.