Replace path in links only once (for pages), partially fixes #36