distance-ir: Make sample point file parsing more robust