Fixed an issue with MediaObject.serialize_resource_list()

Serializing the MediaResource with a blank res uri was causing
 some strange side-effects and warnings. Changed the code to
 write the uri into the MediaResource and then set it back to
 blank after serialization.