Make script Python 3.x compatible.