Remove read-only flag from files in clear_directory.