Fix ReadBuffer

There are problems in original code
- `Match{nil, nil}` is appended if ReadString returns error
- `ReadString` cannot read last line if it does not have newline