Added virtualenv option and tests

Ok improved patch that SHOULD pass the travis-ci tests, all things being equal. I do think perhaps a better solution to mock options should be investigated however.