fix relative URLs like x/../y to y