use os.mkdirs to build any missing parts of the directory structure to the config log path