escape filenames to fix bug where filenames would not be shown and corrupt the output