Check if a ref exists using filesystem, not `rev-parse --verify`

We presume that if "origin/master" ref exists, that means this file
represents it: `.git/refs/remotes/origin/master`.

This is part of the effort to reduce the number of shelling out to git
if an alternative, more direct approach is available.
Read default branch for remote from filesystem, not `rev-parse --symbolic-full-name`

Assume that the default branch ref is stored in the file located at
`.git/refs/remotes/origin/HEAD`

This is part of the effort to reduce the number of shelling out to git
in a single invocation of hub if a more direct alternative is available.
Fix Ruby 1.8 failure with missing stderr in Cucumber test

In cukes, we use Aruba which uses ChildProcess to handle spawning of hub
processes in tests. It uses Tempfile to create file descriptors with
which stdout and stderr streams are collected from the child process.

However, when hub finished with an `exec`, the stderr in one test would
be mysteriously blank in Ruby 1.8. I tracked that down to being an issue
of Ruby not flushing STDERR output to the stream (really a Tempfile in
the context of tests). https://travis-ci.org/github/hub/jobs/15965636

This hopes to fix the tests, but shouldn't change anything about how hub
operates normally when invoked directly.