resolve sorting
move linesorting check script to testdata directory
add testcases for -sortlines