Add some helpers for attachment paths.
Add preamble template.