avoid race between os.path.exists and os.makedirs
os.path.exists
os.makedirs
See merge request !296 (merged)