Run-as-module for files/folders, for #630

Some fine tuning will be required, especially around assumptions of configuration names and running module dependencies.