Applescript: Check if application is active.