Update examples for new I/O api.
Merge pull request #8 from brandonson/master

Update examples for new I/O api.