Ex-first minister attacks Scotland's government