Factor out management scripts out of manage.py