Support more options for where to write the precompiled templates to. Also mkdir -p the directory hierarchy leading to the output file.