Scottish man in court after farting in police officer's face and saying, "How'd you like that?"