Escaping filenames
Normalise line endings for the template text
Ensure output markdown files are truncated properly