Fix decoding of platform name.
Merge pull request #1530 from mdboom/tests/encoding-is-none

py.test cannot run if sys.stdout.encoding is None