Simplify File.readln(buf) example using a single output string

This is probably more performant than an array of idup'ped strings.
(Suggested by Steven Schveighoffer).