How about:

    with chdir(config_data.project_directory):
        ....

As in `aldryn_installer.django.setup_database()`