Add Python 3 support to standalone scripts

Earlier (in #969), I noticed that these did not support Python 3.