Use assert instead of returning errors
Robustify git_object_lookup_bypath tests