logger.py: create directories for log files if not existing