Fix error creating cache directories.