Replaces flags [$FLAG] in templates with supplied data {"FLAG": "data"}, writing the output to files. Intended to be used for building static websites, but naturally can be used for various other similar tasks.