Should prevent corrupted/semi-downloaded files when interrupting the download script while it's writing a file.