save_object function

Save an object from a datasource to a local file