That's just typical Ball Python behavior. The way I get mine to calm down about me touching their heads is:
I'll hold them in my right hand, and with my left hand i'll slowly move it up from underneath them. Then i'll take the pointer finger on my left hand and touch the bottom jaw. After they get comfortable with that i'll start to scratch their chin. Once they get used to you touching them there after several days of handling, then just slowly touch the back of his neck, and slowly work your way to his head. Do this repeatidly until it doesn't bother him. And after a few weeks of this they will stop being head shy. Or at least mine have stopped being head shy.
-Matt