Permit writing output to other than stdout.

Change-Id: I8349f347578bab564e4c37ee2c87314881e09b01
Merge "Permit writing output to other than stdout."