fake stdout should have encoding attribute that matches the real stdout

Some programs expect this attribute, and use it to encode strings before writing to stdout. If it's not there, they fail with an AttributeError.