Patch my Marc Lemburg to fix urljoin("/a", "..") and urljoin("/a", "..#1").
diff --git a/Lib/urlparse.py b/Lib/urlparse.py
index 22a5fd0..560028d 100644
--- a/Lib/urlparse.py
+++ b/Lib/urlparse.py
@@ -151,7 +151,9 @@
 			i = i+1
 		else:
 			break
-	if len(segments) >= 2 and segments[-1] == '..':
+	if len(segments) == 2 and segments[1] == '..' and segments[0] == '':
+		segments[-1] = ''
+	elif len(segments) >= 2 and segments[-1] == '..':
 		segments[-2:] = ['']
 	return urlunparse((scheme, netloc, joinfields(segments, '/'),
 			   params, query, fragment))