Changed strbuf_readline_nonempty to not use reset or chomp