Fix a few minor problems with Travis install & build scripts. Other changes allow `before-install.sh` to be run locally.