Fix scripts to work with Python 3 without 2to3.