I suppose he uses the keyhole contour?

It is perfectly legitimate to integrate along a branch cut as long as you know what you're doing! You have to remember that you are, in fact, integrating on the Riemann surface of the logarithm, which is a helicoid. Thus the two parts of the contour which lie above and under the real axis, although they appear to be very close to each other as drawn on the plane, actually lie on two different sheets of the helicoid; they just happen to both lie above the same line segment in the plane.