Fix a Unicode issue when normalizing diffs for Bitbucket.
Review Request #8663 — Created Jan. 24, 2017 and submitted
We attempt to append a trailing newline to diffs on Bitbucket, if one doesn't exist. However, we were doing that by comparing against Unicode strings, which results in UnicodeDecodeErrors. We now properly use byte strings instead.
The new unit test failed prior to this fix with the reported error. It
succeeded after the fix.