Exporting UV coordinates
This issue is that you are accessing UV's by the vertex index,

ob.data.uv_layers.active.data[vert].uv


This is incorrect, you need to iterate over the face loops and access UV's by the loop index.

This is how you could access loops.

            for face in ob.data.polygons:
                for vert, loop in zip(face.vertices, face.loop_indices):
                    for item in ob.data.vertices[vert].normal:  # normal
                        fid.write(struct.pack("f",item))
                    for item in ob.data.vertices[vert].co:  # vertex
                        fid.write(struct.pack("f",item))
                    for item in (ob.data.uv_layers.active.data[loop].uv if ob.data.uv_layers.active is not None else (0.0, 0.0)):  # uv
                        fid.write(struct.pack("f",item))


Note that ob.data.uv_layers.active is not None should probably be moved outside of the loop as assigned a var has_uv for eg, its quite inefficient to check this all the time.