Fixed wrong URL for filtered stats
Replaced unnecessary split by regexp by string.split()
Stats processing: speed up user agent parsing slightly
Drop the trick using an empty tuple as infinity, use float("inf") instead
Stats processing: "It's easier to ask forgiveness than it is to get permission" (directory creation)
Fixed tiny issue (dict.keys() => dict.iterkeys())
Using Jinja2's autoescape extension is unnecessary