[#517] Small refactoring in travis-build script