patchwork-bot: Create CACHEDIR if it is missing

Create the CACHEDIR if it is missing (e.g. the first time
git-patchwork-bot is executed).

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Link: https://lore.kernel.org/r/20211201001126.4106635-3-keescook@chromium.org
diff --git a/git-patchwork-bot.py b/git-patchwork-bot.py
index d1eac6c..dc10fd0 100755
--- a/git-patchwork-bot.py
+++ b/git-patchwork-bot.py
@@ -1375,6 +1375,9 @@
         cfgyaml = fh.read()
     CONFIG = ruamel.yaml.safe_load(cfgyaml)
 
+    if not os.path.isdir(CACHEDIR):
+        os.makedirs(CACHEDIR, exist_ok=True)
+
     if cmdargs.housekeeping:
         for _pserver, _sconfig in CONFIG['patchworks'].items():
             for _pname in _sconfig['projects']: