kevva/download — pull request #7 by miniflycn (2014-01-05 15:11:05+00:00)
Title: fixed the bug when try to download an array of files

```
it('should download an array of files', function (cb) {
var src = [
'https://www.google.se/images/srpr/logo4w.png',
'https://ssl.gstatic.com/gb/images/k1_a31af7ac.png'
];
var dest = 'tmp';
var dl = download(src, dest);

dl.once('close', function () {
fs.statSync(dest + '/logo4w.png');
fs.statSync(dest + '/k1_a31af7ac.png');
cb();
});
});
}
```

I found that if I just run this test case, it will occur a error.
Actually the test case has some problems:
* close even emitted when just one file downloaded
* we have download the logo4w.png before:
```
it('should download a file', function (cb) {
var src = 'https://www.google.se/images/srpr/logo4w.png';
var dest = 'tmp';
var dl = download(src, dest);

dl.once('close', function () {
fs.stat(dest + '/logo4w.png', cb);
});
});
```