Merge pull request #22 from stefanw/python-3

Convert to PEP 3110 style exception catching