Fixed the inverted condition in toggle_read_only. Also calling this function a second time in main, once the backup is completed, to restore write mode.
Merge pull request #2 from Chouche/master

Fixed the inverted condition in toggle_read_only.