Making fixunicode more robust and also fix stderr.

Process now;
 * Actually test if unicode can be written to the terminal.
 * Only update the encoding if we need to.
 * Test the update to the encoding was successful.

We now do this for both stderr and stdout too.