Fixes for prefix handling in links.

Add unit tests for links with the --prefix option, fix prefix handling
for wiki words, and update docs to match.