input check in file download statistic

it's not in issue in the core but if someone uses the method
getDownloadStatistics and allows the user to specify the limit,
we're opening a security hole.
Merge pull request #856 from Remo/patch-50

input check in file download statistic