lazy ensure the directory exists