Travis CI: refactoring build script