savecache: check permissions on the correct directory