Fix for virtual env use.

PROJECT_ROOT and DEPLOY_DIR need to be outside the clause that
detect whether a virtual env is active because it is used later
outside the clause.