Construct a filename to save the session in based on SESSION-ID. If the directory ~/.emacs.d exists, we make a filename in there, otherwise a file in the home directory.