Fail fast: move installation stuff that's not needed in the script: section closer to where it's needed. This saves time by avoiding it when a test fails.
Merge pull request #879 from hugovk/install

Fail fast: install stuff on Travis only when needed