prevent relatedTemplate from truncating a filename to end in whitespace
Avoid a problem with temp file names ending in whitespace on filesystems
like VFAT that don't support such filenames.
See
a6eb7d73398fc1729faec663c1822023e540643b previously for the same but
with "."
At some point relatedTemplate is more bother than it's worth and it would
be simpler to just use "temp" as the basename of all temp files. We seem to
be approaching that point, since my interest in absurd ancient filesystem
limitations is limited.
Sponsored-by: unqueued on Patreon