fix bug in --force-periods logic
refs https://github.com/piwik/piwik/pull/319
refs #5396