Fix test for accompanying text upload and incorrect error handling around exec()

Fixes ISLANDORA-855.  Also see the commentary around the 5a16322 commit.