specify exception types in all except clauses; fixes #16

Based on some review of the pygit2 C source and some testing, these seem to be the only non-fatal (as opposed to e.g. `MemoryError`) exceptions that `lookup_reference()` raises.