Judge in Scotland finds comedian guilty of telling a joke.