Preserve backup files

This pull-request introduce two distinct changes:
    
- an existing backup file is never overwritten;
- the backup extension is the same for all backups in a given run.
    
Without this change if a file is modified multiple times in the same
execution only the last edit can be rolled back.