c9c1a739fd
Add shell_escape() to safely embed values in generated shell scripts. Replace '$(ls ...)' anti-pattern with glob iteration to correctly handle filenames containing spaces.