Checking whether a path does not exist before trying to create it does
not follow the Python paradigm of asking for forgiveness, rather than
permission, and opens up a time-of-check to time-of-use race.
On systems that follow the FHS it may be desirable to separate logs and
cache files into dedicated base directories (e.g. /var/log/pretix or
/var/cache/pretix).