A kind-hearted Glasgow solicitor has saved a puppy from death row - and made Scottish legal history in the process.