pypa/pip — pull request #1034 by teh (2013-07-07 22:32:02+00:00)
Title: Set correct mode on files after copying a source directory.

copytree copies the mode bits of the source. If the source is readonly
then the subsequent operations like creating egg information will fail
because the temporary directory is not writable.

The permissions 0700 are taken from the original mkdtemp directory
which gets blown away by unpack_file_url.