[Filesystem] Made sure Filesystem::dumpFile() overwrites an existing file

#7753 introduced a change in behaviour. Before, ConfigCache simply used the ``rename()`` function to save a file. It was replaced by ``Filesystem::dumpFile()`` which internally uses ``Filesystem::rename()``. The later checks if file already exists and throws an exception if it exists.

This PR makes sure that ``Filesystem::dumpFile()`` removes the file before creating a new one.

Alternatively, we could introduce a third parameter to the ``Filesystem::rename()`` which would allow to overwrite the target file.

| Q | 	A
| ------------- | ---
| Bug fix?	| yes
| New feature?	| no
| BC breaks?	| no
| Deprecations?	| no
| Tests pass?	| yes
| Fixed tickets	| #7816
| License | 	MIT
| Doc PR	| ~