added test cases, and changed prepareHeaderFromExtract() and quickExport() to take an options array