Wrap config templates in quotes

Whitespace in filenames was not handled robustly.Also improved logic to determine whether we're in a local or installed version of autowiring.