cli: automatically detect if stdin points to a TTY
cli: automatically detect if stdin points to a TTY

Also allow for the filename to be '-', and just start reading from
stdin.

joegen/sjs,saghul/sjs,joegen/sjs,saghul/sjs,joegen/sjs,saghul/sjs,saghul/sjs