copied webpath method from mojito
Changed path.join for href's to use webpath