Moved some linux-only logic from travis config to script.