Add a `fileMode` options for compilers

Previously we used the `filename` option to determine which compiler
we want to use. But that's not a good idea because we may have
templates outside `template` tags and still have a filename.