Fix issue #387 weboob-config update fails on Windows
The issue #387 (closed) is due to the fact that on Windows open files cannot be removed or renamed.
The fix consists in:
- closing files when they have been written
- before renaming a file, deleting the target file if it exists already