Catch only single exception
Improve git repository setup

With configured origin remote in global git config, current approach
failed as it had half existing remote (repo.remotes.origin did not
exist, but git remote did show it).

Now we do not try to add origin if git already sees it and we configure
branches to fetch, this should also prevent fetching of branches we
don't follow.

Fixes #268.