Possible meanings are 1) "their" refers to the creatures. Alternate translation: "they would go straight in any one of the four directions that the creatures looked towards" or 2) "their" refers to the wheels.
Possible meanings for "the head" are 1) this refers to the winged creatures. Alternate translation: "they went in whatever direction the winged creatures were looking" or 2) this refers to the front wheel. Alternate translation: "they followed in whatever direction the front wheel went"