Add ios-sim to unit testing script phase

Modified the run script phase to run the tests using ios-sim if a flag
is passed on the command line. If running from Xcode, tests should act
normally.

Script from:
http://stackoverflow.com/questions/12557935/xcode-4-5-command-line-unit-testing
Add testing Rakefile

This allows us to simply run the tests by typing `rake` on the
commandline, instead of having to remember the entire command