migrate helpers.py from apps/amo (bug 1074184)

And no real idea why these tests are in this file either.  ImageCheck is in utils.py