Adds support for reading input from STDIN.