filetemplates: Automatically create directory for license templates
Saving license templates did not work because the directory did not exist.
(cherry picked from commit 5099e085073af0a7cf41594cdc5dd7c736f58211)