Fix Emacs configuration errors

1) .emacs -> .emacs.d
2) Find and fix various errors