Fix tests in Python 3.3 with --no-subprocess

See issue 3629.  Test by running ./bin/test --no-subprocess in Python 3.3.
Merge pull request #1799 from asmeurer/python3.3-no-subprocess

Fix tests in Python 3.3 with --no-subprocess