use urlparse instead of concatenating strings

fixes #8