Decide how we want to name the output file
Do we want to:
- Renamed the original file
filename.bakand name the cleaned one
- Keep the original file named
filenameand name the cleaned one
filename.cleaned? This is how it's currently done
- Remove the original file, and name the cleaned one
I'm not a big fan of the third option, because should the cleanup process fail (MAT2 is written in Python, so this might happen), the original file is lost.
The first option might be the best way, but it means that for some formats, we must use a temporary file, because some parsers can't work inplace.