When the root cache is not writable use home_cache

The home_cache is `~/Library/Caches/Homebrew` on MacOS and
`~/.cache/Homebrew` on other systems.