Error prevention refeactor.

Virtualenv validation moved into 'get_virtualenv'.