use the correct cache directory on mac (took inspiration from ggogle chrome)