fake stdout should always have encoding attribute

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.