Handle binary input in console helpers

The standard_input may be set to binary mode via io:getopts/2
and in case such cases the "i/0" console helper got stuck as
it was unable to match new lines in binaries.