The executor or administrator is entitled to the possession and control of the property of the deceased both real and personal and to receive the rents and profits thereof until the administration is completed, or the same is surrendered to the heirs or devisees by order of the court; but where such property, or any portion thereof, is in the possession of a third person, by virtue of a valid subsisting lease or bailment, the possession and control of the executor or administrator is subordinate to the right of the lessee or bailee. During the time the property is in the possession or control of the executor or administrator, he shall keep the same in repair and preserve it from loss or decay as far as possible.