Filter out curves with zero length in Path#contains() algorithm.

Fixes #227