Made platform matching more tolerant
Merged OSX script into standard script
Merged OSX script into standard script