I found the problem. It is a years-old bug in calibre.
If:
- the save template generates a path longer than allowed, and
- the last segment of the path (the part after the last slash) contains a period such as an author with name "A. N. Author", and
- the text after the last period was also longer than allowed
then calibre generates a file name consisting of a single letter. In your case the generated path is very long, has only one segment (no slashes) and (I assume) there is an author early in the list with a dot in his/her name, triggering the bug.
I have submitted a fix to Kovid. The fix might require some discussion, but I expect it to be in the next calibre release.
Thanks again for your help.