Each module carries its output directory
Refactoring: common logic extracted and moved to a util class
Using module's output directory instead of a generic one
Ability to direct output of different modules to different directories
Rename variable