Add helper function to get config as module

Breaks functionality out of smush, moves to base for resuse in public.