Fix tests in Python 3.3 with --no-subprocess

See issue 3629.  Test by running ./bin/test --no-subprocess in Python 3.3.