Of course I probably have to use dcraw to read it for me, but dcraw is just about the worst piece of code I've ever seen in my life. It's a miracle to me that people are able to write functioning software from code like that.
Paul Lee has a modified dcraw and some nice sample pictures of how demosaicing can go wrong (click the Moire or Aliasing links).
My idea for high quality RAW processing :
First of all, abandon your idea of an "image" as a matrix (grid) of colors (aka a bitmap). The S90 sensor has barrel distortion that's corrected in software. It also samples colors in an RGGB Bayer mosaic pattern (like most cameras). The two of those things combined mean that you really just have a collection of independent R's, G's, and B's at irregular positions (not on a grid due to barrel distortion). Now, you should also know that you need to do things like denoising on these original samples, NOT on the grid of colors after conversion to a bitmap. So I want to denoise directly on the source data of irregular color samples. Denoising R & B should make use of the higher quality G data. Denoising should of course use edge detection and other models of the image prior to make a Bayesian maximum likelihood estimate of the sample without noise. To output a bitmap you need to sample from this irregular lattice of samples (mosaic'ed and distorted). Resampling creates aliasing and loss of information, so you only want to do it once ever on an image. There's absolutely no a-priori reason why we should be resampling to the same resolution as the sensor here. You should resample at this point directly to the final resolution that you want your image. For example with the S90 rather than outputting the stupid resolution 3648x2736, I would just output 3200x2400 which would let me view images at 1600x1200 on monitors with a box down-filter which will make them appear much higher quality in practice (vs 3648x2736 viewed at 1600x1200 which involves a nasty blurring down-filter). The output from this should be a floating point bitmap so that we don't throw away any color resolution information. Exposure correction can then be done on the floating point bitmap without worrying about the irregular lattice or any further resampling issues.