Core: Give preference to command line setting for output directories for root and batch files, and provide default for batch files directory to avoid crash when not set in batch mode