Scotland's criminal justice system is "not working" and wasting human lives and money, according to Henry McLeish who authored a report on prisons for the SNP government in 2008.