Rewrite logic around finding virtualenv