Fixed an issue when downloading PDFs with special characters in the filename

An error was caused when trying to download a PDF which has special characters in the filename. We now sanitise filenames before exporting which replaces any non ASCII characters.