Fix unit tests for Bazaar on Python 3.x.
Review Request #10464 — Created March 21, 2019 and submitted
We had some tests for Bazaar that tried writing the wrong string type to
a file. This change updates the file writing to ensure we're writing
byte strings exclusively.
Unit tests pass on all supported Python versions.