Update Cocoadialog_Selector

Updated the code, added some exit 0 and some credit for the resources I pulled to make this script work.