The Court of Session said Scottish ministers had shown ‘a lack of proper respect’ for the Information Commissioner.