Dogs who wag their tails are not necessarily friendly.