fixed params error in CCSpriteExtend:playAnimationForever()

added  param "mode" in io.write()  to control file open mode