Move shared index if root is read only

If etc is read only the shared index won't be writable. This creates a new
directory for it and adds the relevant code changes to have the directory
created.
At this time there is no attempt to move the existing index but it should be as
easy as using file to move the existing index.