Fix pointOnLine
Corrected algorithm via: http://stackoverflow.com/questions/11907947/how-to-check-if-a-point-lays-on-a-line-between-2-provided-points