Read console fixes

Reworked pull request #873. Sending a return key to force ReadConsoleA to exit before closing the stdin handle. Fix only applies only for Win8+.