reading from stdin works!

The first read from stdin calls fstat.  We work
around this by setting the stdin file descriptor to
nonblocking, attempting to read one character, and
then putting the character back (using ungetc)
if one was read.