US snack maker Diamond Foods has replaced its CEO and CFO after an internal investigation found the company had incorrectly accounted for payments to walnut growers.