Deflection and penetration of cracks at an interface between two dissimilar materials