only add video-id to archive, when successful

Example:
no space left--> youtube-dl adds the id to archive, but the video isn't fully downloaded
Update YoutubeDL.py
Merge pull request #4501 from AndroKev/master

only add video-id to archive, when successful