That sounds like a general problem uploading the sketch, and not specific to the disk expander sketch. Are you able to load any other sketches? Maybe try the standard Blink example?
The issue sounds like the problem is on your Mac, and not on the Yun. Perhaps the Arduino software is not installed properly, or you have an account permissions problem? I'm not familiar with the Mac version, so I can't give you any specific help.
Assuming you can't load any sketches, looking through the Installation & Troubleshooting forum might give you some ideas, if not, that is probably a better place to post this problem.