fixed urls construct

Fixed haiwen/seafile#820.

We used string concatation to construct urls, which can't handle
multiple slashes correctly. We need something like python's urljoin
function.