use modern exception syntax

python3 has removed the archaic "except foo, e:" syntax in favor of
"except foo as e:", and python 2 clearly deprecates the earlier form
too (see http://docs.python.org/2/tutorial/errors.html#handling-exceptions)