Made system virtualenv more robust and ensured that pip logging would occur in an appropriate directory upon failure to avoid errors