error cleanly instead of segfaulting for missing config files or non-git directories