Modify 'raise' syntax for compatability with Python 3.