Whenever, to prevent the spread of any communicable disease which cannot be cured or controlled by isolation and adequate or proper veterinary treatment, the commissioner or any of the commissioner's agents find it necessary to euthanize any animal infected with or directly exposed to any infectious, contagious or communicable disease, which cannot be cured or controlled by isolation and adequate or proper veterinary treatment, and if the owner of the animal elects to receive indemnity for it, the commissioner shall require the owner, before the appraisal and death of the animal, to execute an agreement that the owner will thoroughly clean and disinfect all premises that may have been infected by the animal in the manner the commissioner prescribes. If the animal has tuberculosis, the agreement will require the owner to have the entire herd of bovine animals tested with tuberculin by the commissioner or the commissioner's agent, at times the commissioner designates, and the agreement will require that the owner not admit to the herd any bovine animal that has not had a negative reaction to the test. The agreement shall be in duplicate, one copy to be retained by the signer, on a form prescribed by the commissioner, and shall be signed by the owner or the owner's agent. The agreement shall be effective for a period of two years from the date it is executed. All animals for which the owner claims indemnity shall be appraised before being euthanized, and the owner shall be indemnified as hereinafter provided: Provided, That any animal infected with rabies may be euthanized by the owner or any person authorized to do so without an agreement or appraisal, and if the disease is caused by a dog bite, the animal shall be appraised and the owner shall be compensated as provided in article twenty of this chapter.