FIX: encode the output for junit reporter.

This patch fixes the test suite on Python 2.7 and PyPy.