Slightly optimize read_line()

No need to allocate an additional vector. Instead directly push into the
string.