Updating exception syntax for Python 3

Fix #1

According to http://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception this fix will be compatible with Python 2.6 and up, including Python 3.