Catch issue in config set with no config file

This prevents a segfault when setting a value in the config of a
repository that doesn't have a config file.
Merge pull request #1522 from arrbee/repo-open-with-no-config

Catch issue in config set with no config file