TIMOB-12740-3_1_X: Refactor script to use proper AppleScript types and iTunes idioms.