cli_example.rb: Use f.write instead of f.puts to write to a file.

puts adds a '\n' at the end.