Changed error message on failure and made test more robust

Better error message
Merge pull request #785 from edx/jonahstanley/fix-image-upload

Changed error message on failure and made test more robust