This isn't a realy a script but a very minor mod.
Kinda cheating too

After I unpacked all the files, all I did was find the acceleration value for my ship, in the Tships file, and changed it to a stupidly high value (41000, the same as the Paranoid M5).
With one hand on my throttle, whenever something turns to ram me, I just stop dead.
The other ship always turns away at the last minute.
Since I started doing this, I havn't been rammed once.
It does show that the enemy AI is programmed to turn away when playing chicken, but the distance's are probably set wrong.
Could this have something to do with all distances in the game being set to the centre of the object. If so, maybe the AI can be changed to add 100 meters to the distance.
Over to you modders to see if something proper can be done.