Duplicate git_error struct before passing it on

See #104.