Fix several issues with .emacs.d config script