fileutils: raise an exception if stdin reaches EOF.

This commit resolves the issue that when Disco crashes, the zombie python
processes were consuming 100% of CPU.  The problem was doing a select on the
stdin file descriptor and if ready, reading from it.

The problem is described here:
http://stackoverflow.com/a/3301530