Cosmological perturbations in a family of deformations of general relativity