Scotland’s councils have worked with other public bodies to identify £15m worth of fraud and errors in a national detection exercise.