I tried to do this and the terminal kept saying "Permission Denied". Any ideas how to get around this?

P.S. I used su to become a super user (root) and opened both darwin images like the article said.
You could try logging in as root at the mac os x login screen. That should make sure you have all the right permissions.
Now I should have been paying more attention to this but I had to do the script twice. I believe I got errors both times (although I was using the old script). But after the second time I typed gcc and it worked fine.