do not stat a file without filename

When we are reading from STDIN, we have no filename set, so dont try to stat a real file.
This patch was brought to you by jnthn++ :o)
pass STDIN to subprocess in shell()

... so the child process can read from our STDIN when it creates a prompt.