Your error is in:
(defvar my-auto-save-folder (concat "~/.emacs.d/auto-save")); folder for auto-saves
(the call to concat
with a single argument is pointless, incidentally).
If the optional element UNIQUIFY is non-nil, the auto-save file name is constructed by taking the directory part of the replaced file-name, concatenated with the buffer file name with all directory separators changed to `!' to prevent clashes.
Emacs identifies directory names by a trailing /
, which means that "the directory part" of the path you've used is "~/.emacs.d/".
You want:
(defvar my-auto-save-folder "~/.emacs.d/auto-save/"); folder for auto-saves
The positioning of the comma in the following is also strange (although apparently it still works):
`((".*", my-auto-save-folder t)))
That should really be:
`((".*" ,my-auto-save-folder t)))