linkfile: scan man page names better

[a-z_0-9-]* matches names better than \w since the former includes
dashes, which sometimes are used in man pages. For example
libcurl-errors.3.