fix urlpath issue, use more elegant urljoin