Index: branches/htmlform/templates/widgets.js
===================================================================
--- branches/htmlform/templates/widgets.js	(revision 513)
+++ branches/htmlform/templates/widgets.js	(revision 514)
@@ -3,6 +3,8 @@
 	var pathbits = window.location.pathname.split( '/' );
 	for ( i = 0; i <= pathbits.length-2; i++ ) {
-		mypath += pathbits[i];
-		mypath += "/";
+		if (pathbits[i] != 'cgi-bin') {
+			mypath += pathbits[i];
+			mypath += "/";
+		}
 	}
 	return mypath;
