get emacs dir the right way around