Avoid adding on duplicate extensions.

As we often use filenames for datastream labels, and then use the labels to generate file names for download, we were ending up with file extensions being doubled up.