Seed the chiles, rinse and set aside. Bring 4 cups of water to a boil. Remove from heat and add the chilies, pushing them down with a spoon so they are fully submerged.
Cover and let stand for 30 minutes.
Meanwhile, in a saucepan over medium heat, boil the onions in water until soft, about 25 minutes. Drain. Or alternatively you can put the onions under the broiler to blacken.
Remove the soaked chiles from the water, reserving 2 cups of the liquid. In a food processor, blend the chilies, onions and garlic until pureed.
In a saucepan over medium heat, heat the oil. Stir the cumin into the hot oil, being careful not to burn it.
Add the chile mixture and simmer for 3 minutes. Add 1 cup of the stock, 1 cup of the reserved chile liquid and the tomatoes.
Add just enough additional stock and reserved liquid to make a sauce the consistency of thin gravy.
Add the 2 T sugar and 1/2 T salt and cook for 10 minutes longer, stirring occasionally, until the sauce is the consistency of a thin gravy.
Taste and add more salt and sugar if needed.
Set aside to cool. Store in an airtight container in the refrigerator for 4 to 5 days, or in the freezer for 2 to 3 months.