Mjansen/virtualenv

More work on virtualenv support. Works for me now (TM).

And a bunch of changes that would have saved me some time in finding the reason for some of my troubles.