A man was reunited with his dog six months after running away