A new study has found that humans from around 10,000 years ago took dogs along with them on their travels across the world.