Trying to fix up emacs in terminal

Also added a es script, to shutdown the emacs server.  My mac hangs when shutting down if the server is still running, and I am tired for force quitting emacs to test changes.