Small code fixes
Properly calculate semilandmark points.

This code originally didn't correctly handle the case where more than
one semilandmark belonged to a line segment. In the case where there
was only one semilandmark, it was also incorrectly biased towards
values closer to the end of the line segment than the beginning. This
commit fixes both of these incorrect behaviors.