Fold bifurcations in discontinuous systems