Partial regularity of cartesian currents which minimize certain variational integrals