Fixed totalDirs JS error

@frisco82's commit moved the stats into a "summary" structure. But it seems his commit was based on an older version of master where my older commit aeac3186ee52fcadf57b34fc307f5441041cb43d wasn't there yet.

It clashed after the merge.

I think in the future we should retest after merging to rule out this kind of issues.

Please review @kabum @frisco82 @karlitschek @Kondou-ger