[Typ] fix artifact test encoding
[Typ] fix artifact test encoding

CreateArtifact always opens its output file in binary mode, so
make sure we only write out bytes to the stream and not strings.

Bug: chromium:983432
Test: `./run tests` still passes
Change-Id: Ic211cc7e4a21e6f508d252cfc624ab994394a518
Reviewed-on: https://chromium-review.googlesource.com/c/catapult/+/1699312
Reviewed-by: Dirk Pranke <6693ee08b084bb2ffa767f664c99b689395e0e4b@chromium.org>
Commit-Queue: Mike Frysinger <8f3f75c74bd5184edcfa6534cab3c13a00a2f794@chromium.org>

catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult,catapult-project/catapult