Use `user-emacs-directory` instead of hardcoding "~/.emacs.d/".