CLI: Redirects output to stdout on stdin input.
Fixes #568.