bash: refactor overly clever code
Install emacs wrappers only on Darwin platform