Add check to see if cache directory is writable
Set the permissions to be most open by default

This is to allow other users/processes to read the cache
Added a test non-writable directories that we can make writable