Update doc/cookbook: use $HOMEBREW_PREFIX

Use $HOMEBREW_PREFIX instead of `/usr/local` when talking about
formula file path.

<del>Also fix a grammer mistake.
"locally" is an adverb, not a verb.</del>