Lewis, agree hard to beat CCDStack for the grunt work. Not sure if you've seen Adam Block's supplemental CCDStack v2+ tutorial (
here, password provided. Make sure you download it for best viewing) where he explains the calibration management capabilities and automated scripting tasks of the app. I've just started doing this to save time. Matching items in the FITS header is great for flats. My system has an instrument rotator thus need to take flats at different PA's and E/W of the mount for accurate flat correction. Having CCDStack automatically match the flats to the data is real treat. CCDStack only gets better.
Re: replacing missing values in CCDStack. You my friend are in luck. At AIC back in 2009 (or was it 2008, ah can't remember), Adam was handing out free tutorial CD's specifically on the topic. Shoot me an email or PM, and we'll see what can be done.