It's commonly believed that dogs wag their tails to convey that they are happy and friendly, but this isn't exactly true.