Fixed totalDirs JS error

This is due to on one side @frisco82's commit which 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.

Please review @kabum @frisco82 @karlitschek @Kondou-ger