[BUGFIX] Ensure directories are created