More tests, fixes, and performance enhancements

@hoelzro tests are failing due to this not being valid syntax in Python 3.  Swap with "except <Exc> as orig_e" please and this is good to go.