Fix a bug on RecordRewriter when a variable is matched in many clauses, closes #1037
`IO.gets` and `IO.getb` now return binaries when reading from stdio