Test adding invalid attachments fails correctly

This test makes sure that valid attachments don't get left in
the attachments database, so we're able to clean them up during
-compact.
Output status code on xcodebuild failures.

Tweak to rake xcpretty commands

As the suggestions on the xcpretty GH repo have changed.
Merge pull request #38 from cloudant/30443-good-and-bad-attachment

Test adding invalid attachments fails correctly