Use built-in Exception attributes for storing & retrieving error message

Keeping msg as a property so it's backwards compatible.

Fixes #171.

Note that this only fixes Python 2.x for now.