Make sure a repo cloned by osa_differ is properly prepared (#16)
Make sure a repo cloned by osa_differ is properly prepared (#16)

* Make sure a repo cloned by osa_differ is properly prepared

Currently if a repo does not exist, it gets cloned. If the
notes need to be generated from a branch other than master,
then osa_differ cannot find the ref for the commit.
When re-running osa_differ again, the repo is updated to
include all the refs, and therefore works as expected.

This patch ensures that regardless of whether osa_differ
does the clone, the repo is always updated afterwards to
get all the refs. This makes it work on the first time,
and always.

* Derive exceptions from Exception rather than BaseException

As per the PEP-8 guidelines [1]:

Derive exceptions from Exception rather than BaseException.
Direct inheritance from BaseException is reserved for
exceptions where catching them is almost always the wrong
thing to do.

This patch changes the bare exceptions in order to resolve
the flake8 failures: E722 do not use bare except

[1] https://www.python.org/dev/peps/pep-0008/

major/osa_differ