Limit the number of Travis runs and fix the script a bit