explicitly close stdin

tee(1) does this too.
fix bug when all inputs are pipes

Thanks to Michael Kerrisk's "The Linux Programming Interface" for suggesting
something I immediately wanted to try:

$ mkfifo myfifo
$ wc -l < myfifo &
$ ls -l | utee myfifo | sort -k5n

This was blocking because utee scans for pipes to tee too. In this case
everything was pipes and only tee() was ever called. This doesn't drain the
source pipe and thus never ends.
utee 1.2.1

- explicitly close stdin
- fix bug when all inputs are pipes