Reconstruct the URI rather than using referer

The problem is that browsers don't send referer when clicking links from
https pages (for reasons that seem obvious in retrospect).

I'm not sure if the HTML-escaping is necessary--can a url-escaped string
contain html entities?

I am sure the url-escaping is necessary (sorta). If there's an & in the
URI, it needs to be url-escaped so when you get to validator.w3.org it
doesn't separate the uri param from the rest of the uri. Nothing would
actually generate url params on this site right now but it seems like
prudent future-proofing.
Clean up static paths

static stuff is on /static
print/screen.css is in css/
Capitalization