It looks like you have some of your lines mislabeled. Starting with the line below, instead of 1 1 X it should be 1 4 X.
-dset 1 1 1 ~/Desktop/Data/FaceTask/5025/5025.results/stats.5025+tlrc'[19]' \
I make this mistake from time to time. An easy way to check it is to load all of your dset lines into R and then run table on each of your 3 factor columns:
table(thedata[1])
table(thedata[2])
table(thedata[3])
In this case, the second table command showed the inequality with some subjects in group 4 being labeled as group 1:
1 2 3 4
54 36 36 18