Use GIT_OK to test the return value from git2r C code argument checks

Signed-off-by: Stefan Widgren <stefan.widgren@gmail.com>