Fix silent exit when run from non git repo

@sam-github had pointed this out earlier but I misunderstood his comment.