Added expanduser to cachedir