Improve linkfrom substitution.

Namely removes any number of / characters so that the links in the HTML
output don't appear to be absolute.