Section 40. Whoever rescues beasts lawfully distrained or impounded shall be liable in tort to any person injured for all damages sustained thereby and the fees and charges incurred before the rescue; and he shall also be punished by a fine of not less than five nor more than twenty dollars.