Allow to specify home dir in the cache path via '~/'.

Also, remove unix domain sockets after use.