Allocate strings with c_types.create_string_buffer()

While there, I substituted the the final charcter of the string (which
has to be a '\n') and made the test output more verbose.