ensure that path of the file we're going to open is actually
inside our log root. If not return a 400.
escape dates in the regex so they are easier to pass around,
unencoded spaces kind of suck for that.
catch the possible IOError of openning a file that doesn't exist,
be nice and give people a 404 in that case.
move the content negotiation into a function, for readability
Change-Id: I334e1ac0419cd140c6af35c78634a2d7c05dcf01