1.8.7 is no longer installed on the OS X VMs

Tests should to a certain degree be docs, so let's change this to
something that will actually work.
Fix shell escaping in branch names

This fixes the failing specs introduced in #92 and also improves the way
things are escaped. It used to just surround the branch name in quotes,
but this wouldn't work if the branch name has quotes in it. Using
Shellwords is much more reliable.