added improvements to detect pip 1.0.2, and detect pip version to upgrade to 1.5