Added segment intersect checking and tests
Added segment intersect checking and tests