applescript do shell how to tell if successful