Infer reading from STDIN if no file specified and terminal isn't connected.