On satisfactory proof of title of the owner of the property, the court which hears the charge must order it to be delivered to the owner or his duly authorized agent, on his paying the reasonable and necessary expenses incurred in its preservation, to be ascertained and certified by the court.