Newlines are not valid characters in GCS object names (https://cloud.google.com/storage/docs/naming), but we don't currently validate for this. This leads to confusing errors if users accidentally include a trailing newline char on a string being passed into an IO.
The particular place where this came up was with FileIO using AvroIO.sink, where the directory passed to to() had a trailing newline, but it looks like this will be a problem generally with FileIO **** GCS.
Imported from Jira BEAM-7932. Original Jira may contain additional context.
Reported by: millsd@google.com.