RAZ-2519: Option to let users download with their custom filename
Tweaked how extensions are removed in filename to make it more robust. Previous strategy had issue with ‘.’ being used as part of the filename.