Fix CPAN download URL problems - correct path and use a mirror if specified

LockFile::Simple wasn't able to be built because it's download URL wasn't compatible with the hard coded format previously used in cpan.rb - it returned a 404. 

I've updated the download function to use another metacpan API call to find the 'archive' string which includes a subdirectory if required. 

I've also updated the URL to use the specified mirror if one is specified. This wasn't done previously. The mirror was previously only used when cpanm pulls dependencies. 

With the patch I've successfully created packages of IO::Event and DBI which were mentioned in the commit where the URL was changed last time (in addition to LockFile::Simple).