A lot of awk additions to get files with spaces

Filenames are trimmed, spaces escaped. The output methods were pruned and use awk more. Header row on output added at the end, if needed.