Effective toughness of periodic heterogeneous materials: the effect of out-of-plane excursions of cracks