Fixed a typo which would allow farPos to be less than nearPos
Fixed bytes >=0x80 ending up >0xFFFFFF80
Test script for the test data