git-codereview: create hooks directory if it doesn't exist

Fixes golang/go#21028

On some versions of Git, "git init" will not create ".git/hooks
directory", causing "git change" to fail. This fix will check if the hooks
directory exists, and if not, create it.

Change-Id: I6a9e688740fde8701e5d48630686039c8ebf4172
Reviewed-on: https://go-review.googlesource.com/49070
Reviewed-by: Kevin Burke <kev@inburke.com>
2 files changed