added which test for virtualenv before sourcing it