First step of the resume feature from #24.

I had a closer look to https://docs.python.org/2/library/functions.html#open and maybe mode `w+` is what we really want since it truncate the file automatically.