Fix bug in stdin threading re #351/#350
Fix bug in stdin threading re #351/#350

Needed stronger differentiation between 'not ready for reading' and 'read an empty byte'.

pyinvoke/invoke,mkusz/invoke,mkusz/invoke,pfmoore/invoke,pfmoore/invoke,pyinvoke/invoke