Experimental fix on ReadFile() blocking execution

ReadFile() will block program execution when it reads empty files, or
handles returned by CreateProcess() are not closed. Attempting to fix
this by PeekNamedPipe() to see if any data is to be read first, and by
closing handles CreateProcess() returned.