Ensure pragma checksum is prepended to generated file

Fixes #160
Not that the StreamReader does a particularly good job detecting the encoding via BOM, but why would we assume files on disk are always UTF8 encoded?