Fix IOInputStream single-byte read

Java does signed type conversions by default. Thus, any bytes above 127
resulted in negative return values, which where either illegal return
values or signifying end of file.
Merge pull request #750 from grddev/to_inputstream_read

Fix IOInputStream single-byte read