use code instead of stderr, cleanup xunit so it writes all at once to prevent interleaving

for real this time.

oh, and magically reduced file size of xunit by 100x

@jnwng 

cc @dandixw 
you're already finishing off the file with `\n` on line 117, do you need another here?