Add missing ids for dynamic aggregators.

Dynamic aggragators, that generate an array of results, each with its' own id, lacked a top level id. Errors thrown while aggregating wheren't being reported correctly, since every aggregator was assumed to have an id. This commit adds top level ids, however a better design is needed to support these 'dynamic' aggregators.
Simplify resolving base directory for results.
Ensure errors are logged consistently before exit.

Always exit with status 1 in case of error.