Handle contour edge cases in Path#contains().

Closes #208.