Use built-in Exception attributes for storing and retrieving error message.

Keeping msg as a property so it's backwards compatible.

Note that this only fixes Python 2.x