Changed the way it handles AppleScript, using subprocess. Fixed #1.