Ensure the files are writable before deleting then during test initialization.

This solves cleanup issues when tests have failed and leave behind read-only files.