Allow stdout/stderr to be changed to a IO-like object.

One particular use-case is for https://github.com/opscode/omnibus-ruby/pull/167,
where lots output is generated on stdout and is not suited to be held in memory.