Fix to check S4 class git_repository path slot before usage

* src/git2r.c (get_repository): Added check that slot path is a
  character vector with length equal to one before using the
  path. This fixes the use of new("git_repository") which gives a non
  valid repository with a path character vector with zero elements.