Clarify I/O redirection documentation

Fix the examples and try and improve the clarity of the section.

Closes #1409.