Add error handling to python example

Checking for the exceptions supplied by PyJWT seems cleaner.
Merge pull request #224 from egeland/master

Add error handling to python example