When the root cache is not writable use home_cache
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.
Closes Homebrew/linuxbrew#17.

hanxue/linuxbrew,Linuxbrew/brew,hanxue/linuxbrew,Linuxbrew/brew,rwhogg/brew,Linuxbrew/brew,maxim-belkin/brew,rwhogg/brew,hanxue/linuxbrew,Linuxbrew/brew,maxim-belkin/brew,rwhogg/brew,maxim-belkin/brew