Handle Errors thrown when transacting doi.db file

See [Trello 182](https://trello.com/c/hpduZclq)

Some operations could raise an AssertionError that was not caught by exception handling code to cleanup the transaction.  The modification operations were handling AssertionErrors but the read-only ones were not.

Also cleaned up the logging a little bit.
Merge pull request #539 from datadryad/catch_doidb_errors

Handle Errors thrown when transacting doi.db file