Merge pull request #88 from eahrold/master

when building mailcore2, only run for osx architecture with prepare-mac.sh
Merge pull request #89 from eahrold/master

catch situations where nil would cause array index exceptions
Just being nitpicky.