Download a file and update the current downloaded percentage
From a once over and reading some docs:


You need a resp.on('error', function () {} to deal with http errors
You need a tmpFile.on('error', function () {} to deal with fs/stream errors
tmpFile is an unfortunate name, i would call it maybe tmpStream or tmpFileStream
You use both single and double quotes for strings, stick to one, preferably single quotes
resp should be res ( standard in Node ), or response, it bugs me every time I read the code ;)