Restart the transfer when content-lenght is 0, fixes #275

Instead of adding to the same file between each stop/resume, the transfer is restarded when the server do not provide a content-length.

(please be careful when merging this fix, I'm really rusty at coding)