Implement capture_io for ex_unit
Merge pull request #1059 from mururu/io_protocol

Implement capture_io for ex_unit