Dogs have distinct personalities that resemble their owners and also change over time as the animal matures, according to a new study.