Apparently compileUi explicitly opens the file/buffer as unicode, not
bytes, and then writes a unicode header string (containing the source
file). So the previous attempt to use BytesIO was wrong in this case.
Also images.qrc is being constructed completely in the right here and
now from a bunch of unicode strings, so just use exactly that.