Update apple script to handle files