Only truncate once before updating frequencies

This fixes a bug where we were only seeing the frequencies being updated for the last cohort in the list. This was a result of the placement of the truncate command. Previously, the truncation happened every loop iteration. Now, it happens before the loop starts.

Signed-off-by: Don Naegely <naegelyd@gmail.com>
Merge pull request #243 from cbmi/issue-238

Only truncate once before updating frequencies