Fixed some bugs at polyopts.
Extended PrimitiveTests with segment vs segments tests