Merge pull request #5 from vadhawal/master

Fixing identification of valid intersection
For disjoint segments in a path there can be empty segments of length 0