Large deviations of the free energy in the p-spin glass spherical model