'Mesh' object has no attribute 'uv'
UV coordinates are stored in ob.data.uv_layers.active.data[loop_index].uv since the mesh system update (NGons are supported from 2.63 on). Note that a loop index is required, not a vertex index.

UV textures are stored in ob.data.uv_textures.active.data[face_index].image.

http://www.blender.org/api/blender_python_api_2_73_release/info_gotcha.html#ngons-and-tessellation-faces

You might wanna use the tessface mesh (triangles and quads) for your export. Don't forget to triangulate quads, your original code doesn't seem to handle them at all. Here's an example:

https://code.google.com/p/blender-cod/source/browse/blender_26/export_xmodel.py#518