http://cloud.netfabb.comcloud.netfabb.com is your friend. The gear script frequently makes gears that are less than stellar in terms of mesh.
If openscad won't export, adjust the number of teeth by 0.001 or so, eg gear1_teeth=11.001. this sometimes gives it enough wiggle room to make a better mesh.
also, try an openscad version that's less than 9 months old ;)