Improved method for finding reference files from header, added test for function
Added flux_error column to ouput, background is now averaged from the two regions
fixed strip() call to remove gzip extension from filename.  Replaced with check for .gz ending and simple string slice.
large re-factor to subclass the CosCurve in anticipation of adding a StisCurve and FuseCurve