Better support for relative URLs

relative URLs, starting with ../ or ./ will now be prefixed with the
current page ID where the link is being replaced from.