match erlang keywords more carefully

Use word boundaries in some regex matching to avoid recognizing words that
begin with keywords as keywords themselves, for example avoid recognizing a
function named catcher as the catch keyword. Add a regression test for this
problem.