Remove read-only flag from files in clear_directory.

So it behaves like rmtree (see #566).