Remove trailing newlines from the userdata and put them in the join function.
Remove the zipfile once we have the content.