Should probably use `urlparse.urlunparse` here.  I believe these simple things can fail when unicode domain names and other such nasties enter the picture.