Fix syntax error.
Use new-style exception syntax.
Cannot import __future__ except at start of file.
Fix to work with Python 3.
Make relative import explicit.