I was using notepad ++. I guess creating the files from scratch uses the windows CR EOL format. I switched them all to LF and will never have this insanity happen again!
Firstly to the devs and the support folks thanks for this amazing software! I got all the imaging setup and in use. Unfortunately I hit a snag on the next steps. After imaging, the fog.postdownload script throws errors about not being able to find /usr/share/fog/lib/funcs.sh
Since the variables are undefined the calls to them in the successive scripts fail out and quit. This happens on physical machines, VMs, EFI and BIOS type image deployments. any help would be greatly appreciated I have been trying to fix this issue for over a day.