Run the idling AppleScript on the main thread

NSAppleScript must be used from the main thread.

cf. <https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html>