implemented our own urljoin that does not break up the base

fixes #986
urljoin: only look at startswith if url is a str
fix small problem with doctests