In DM-23717 we were reminded that filters can have spaces in them and these end up in file names.
Dots in the file part of templates cause confusion when extension manipulation occurs in the Location class. To be safe replace dots in the file name with underscores. Do not change dots in directory parts of path though.
This fix is essentially the same fix as was done in
DM-23503 for "/".