Correct auto-mode-alist regexps

`$` matches end of line, `\'` matches end of string. Usually this is not a problem, but the latter is the one we should be using.