Fix compatibility with wheel 0.23.0

wheel now only produces the major python version for the tag of pure
distributions, so expect that instead.
underscore unused variables
Merge pull request #1703 from Ivoz/pep8fix

underscore unused variables
Merge pull request #1702 from Ivoz/wheel023

Fix compatibility with wheel 0.23.0
If at first you can't stat the index file, try again

If Pip is using an index url that starts with http:// or https://, and
it gets a 404, it does Magic(TM) to figure out what the real name of the
package is. The code looks as though it's intended to do this for
file:// urls as well - but it doesn't, because nothing catches the
OSError that gets raised when the first stat fails.

In order to let this failure be handled and let the usual logic kick in,
set the response status to 404 and let the error bubble up.