Add some output flushes to work around buildbot oddness.
Merge.