The current implementation of cheddar backend takes the command line option "-o" as the output directory and lets the XML generator determines the output XML file name based on the constructed XML tree.
This commit adds support of accepting the "-o" option as either an output directory or an output file name. In the case that a directory is specified or the option "-o" is not assigned, the output file name is determined by the XML generator as it was originally implemented. Otherwise, the output XML is stored in the file with the given file name.
This change also enables testing the cheddar backend under the current test environment.