Change cache directory in tests