Nut seller Diamond Foods is shelling out $5 million after being accused of some unsavory accounting practices.