git.get_git_dir() appears to break with older versions of git
When you install the current pre-commit (v1.11.0) on a system using an older git, eg 2.1.4, the `git rev-parse --git-common-dir` ultimately issued by `git.get_git_dir()` yields the result `--git-common-dir` instead of `.git` like you'd expect. This causes pre-commit to get installed in a directory literally named "--git-common-dir", and thus not work.

Happened to encounter using a docker image for an older version of python, which used an older git. Examples to demo the issue:

```
$ docker run python:2.7.9 sh -c "git init foo && cd foo && git rev-parse --git-common-dir && git --version"
Initialized empty Git repository in /foo/.git/
--git-common-dir
git version 2.1.4
$ docker run python:2.7.15 sh -c "git init foo && cd foo && git rev-parse --git-common-dir && git --version"
Initialized empty Git repository in /foo/.git/
.git
git version 2.11.0
```

In git.get_git_dir() as it stands, it appears that the older-git behavior is anticipated. It looks like older gits are expected to throw a `CalledProcessError` when `git rev-parse --git-common-dir` is called, and fall back to `git rev-parse --git-dir`. But evidently that's not working as intended?
diff --git a/pre_commit/git.py b/pre_commit/git.py
index 9ec9c9f..a926116 100644
--- a/pre_commit/git.py
+++ b/pre_commit/git.py
@@ -31,16 +31,13 @@ def get_root():
 
 
 def get_git_dir(git_root):
-    def _git_dir(opt):
-        return os.path.normpath(os.path.join(
-            git_root,
-            cmd_output('git', 'rev-parse', opt, cwd=git_root)[1].strip(),
-        ))
-
-    try:
-        return _git_dir('--git-common-dir')
-    except CalledProcessError:  # pragma: no cover (git < 2.5)
-        return _git_dir('--git-dir')
+    opts = ('--git-common-dir', '--git-dir')
+    _, out, _ = cmd_output('git', 'rev-parse', *opts, cwd=git_root)
+    for line, opt in zip(out.splitlines(), opts):
+        if line != opt:  # pragma: no branch (git < 2.5)
+            return os.path.normpath(os.path.join(git_root, line))
+    else:
+        raise AssertionError('unreachable: no git dir')
 
 
 def get_remote_url(git_root):
['pre_commit/git.py']