Update for new exception syntax.

Python 2.6+ introduced a new syntax for catching exceptions with the exception
value. Instead of `except Exception, e`, it's now `except Exception as e`,
which is really much nicer. Since we're 2.6+ only now, we can convert to this.

Testing done: Ran unit tests.
Reviewed at https://reviews.reviewboard.org/r/4876/