Fix occasional segfault in init; better errors.

The git init options struct was missing a member, which is
never a good plan. Also, move interaction with the libgit2
error reporting API inside.