Ensure XML goes to binary file on py3
Ensure XML goes to binary file on py3

Change-Id: I43ac0ade562d521ec6e2725f05130ae5e8b26ba8
Closes-bug: 1528400

pombredanne/bandit,stackforge/bandit,pombredanne/bandit,stackforge/bandit,chair6/bandit