Also fixes command injection vulnerabilities in gitweb. (CVE-2008-5516, CVE-2008-5517) Hint from jasper@, thanks! help & tests sturm@
Tested by Daniel Dickman, Brad Walker and sturm@. Thank you!