Nicola Sturgeon apologises for handling of Scottish exam results