[tools] now properly handles stdin
Merge pull request #198 from spotify/drewc/smarter-stdin

[tools] now properly handles stdin