Looks like this script uses an aimConstaint to aim the geometry pieces aloing the curve.
So as the script goes along, as the aim vector coincides with the up vector... the gromety flips.
quickFix:
build your track so it points in another axis.
for example if its pointing down the z, point it in the x.
this should solve it.
properSolution:
change the aimUP type in the animation pass of each piece of track... though is more a scripting solution.