Emacs fixes (yasnippet, rgrep) + script fixes