Fix parsing of rrdfiles containing escapes

This fixes parsing of URLs such as `rrd.php?path=some%3Ffile.rrd`, and
if people really insist, paths such as `C:\bar.rrd` (must be written as
`C\:\\bar.rrd`, add additional escapes for Javascript strings if needed).