sanity checks for emacs/vimpager and mac specific environment vars

check if vimpager and emacs exist before setting PAGER and EDITOR
check if on a mac before setting mac specific JAVA vars