Any person having the custody or control of any will shall, within thirty days after he or she shall have received knowledge of the death of the testator, deliver said will to the court having jurisdiction or to the person named in the will as executor, and any executor having in his or her custody or control any will shall within forty days after he or she received knowledge of the death of the testator deliver the same to the court having jurisdiction. Any person who shall wilfully violate any of the provisions of this section shall be liable to any party aggrieved for the damages which may be sustained by such violation.