Check if dir is writable before creating index.