Lock output stream in test-output.
Merge pull request #46 from cgay/stream-locking

Lock output stream in test-output.