Fix a bug in the export settings mechanism

- The bug makes impossible to save the current settings to a location
  where a file with the chosen filename already exists, i.e., the
  mechanism cannot overwrite.