Fixed remaining SyntaxErrors

I know that werkzeug.script is deprecated anyway, but it still makes the
testsuite fail.
Some more fixes.
Merge pull request #2 from untitaker/python3

More fixes.