Detect when download produced an empty file

If the remote provides a non-zero file size (via the `content-length` header), check the size of the created file at end of download, and throw error if we got an empty file.

This is made for detecting component/installer.js#12