On the Growth of Perturbations as a Test of Dark Energy and Gravity