Ensure strings are absent of extra zeroes

Checks for extra zeroes in strings passed to libgit2 functions.

Fixes #571