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