[bug 1004450] Fix circular import in ./manage.py extract

I just reorganized the code a little bit so that the circular import doesn't happen when we run `./manage.py extract`. This assumes that you have `DEBUG = True` locally when you run the command.

r?