CLI: Only read stdin if there were no files supplied and not in tty mode.

Fixes #563
Just as in test below you need to restore `checkPath` method – see "Spying on existing methods" in <a href="http://sinonjs.org/docs/">here</a>