Fix bug where an unamed Modules wouldn't receive the correct debug
options
Make sure we change back to the correct directory before we close things
and reshuffle the order of creating singleton objects.
Change the order that things occur in (again).  We need to make sure
that the output file is made before the modules are created so they have
the ability to create directories and store things.

This may have been another part of what was found in issue #5.