Fix ugly error style on install

By initializing the template engine first we can show the
'Can't write into config directory 'config'' error in a nice way instead
of plain unstyled HTML.