Fix stdin error on Windows

`/dev/stdin` doesn't work on Windows.

Instead using `fs.readSync(process.stdin.fd,buffer,0,size)` seems to work properly.