Check the existence of jit_dir when loading state from pickle
In the `save` method of the `Compiler` class, the `sofile` state is written into the compiler's `jit_dir`:
```python
sofile = self.get_jit_dir().joinpath(soname).with_suffix(self.so_ext)
if sofile.is_file():
    ...
else:
    with open(str(sofile), 'wb') as f:
        ...
```
However, since `jit_dir` normally resides into the `tmp` folder, it can not be present anymore when reloading the state from pickle. This is also true when transferring pickled data from one machine to another.
Checking for its existence prior to open the file would be more robust:
```python
sofile = self.get_jit_dir().joinpath(soname).with_suffix(self.so_ext)
if sofile.is_file():
    ...
else:
    if not path.exists(self.get_jit_dir()):
        makedirs(self.get_jit_dir(), exist_ok=True)
    with open(str(sofile), 'wb') as f:
        ...
```
diff --git a/devito/arch/compiler.py b/devito/arch/compiler.py
index f4775dcac..4714744c1 100644
--- a/devito/arch/compiler.py
+++ b/devito/arch/compiler.py
@@ -1,6 +1,6 @@
 from functools import partial
 from hashlib import sha1
-from os import environ, path
+from os import environ, path, makedirs
 from packaging.version import Version
 from subprocess import DEVNULL, PIPE, CalledProcessError, check_output, check_call, run
 import platform
@@ -235,6 +235,7 @@ class Compiler(GCCToolchain):
             debug("%s: `%s` was not saved in `%s` as it already exists"
                   % (self, sofile.name, self.get_jit_dir()))
         else:
+            makedirs(self.get_jit_dir(), exist_ok=True)
             with open(str(sofile), 'wb') as f:
                 f.write(binary)
             debug("%s: `%s` successfully saved in `%s`"
['devito/arch/compiler.py']