The executor or administrator of a person to whom rent is due and not paid at the time of his death may have an action for all such arrearages against the tenant or tenants who ought to have paid the rent so being behind in the lifetime of their testator or intestate, or against the executors or administrators of such tenants. Every executor or administrator of any person to whom such rent is due and not paid at the time of his death, may distrain for the arrearages of all such rents on the lands which were charged with the payment of such rents, and liable to the distress of the testator or intestate, so long as the same continue in the seizin or possession of the tenant who ought to have paid the rent to the testator or intestate in his lifetime, or in the seizin or possession of any person claiming the lands, only by and from the tenant, by purchase, gift, or descent, in like manner and form as the said executor's or administrator's testator or intestate might have done in his lifetime. The executors and administrators for the same distress may lawfully make avowry.