Fixed page title and header image

Styles were loaded before $Header and $HeaderImg variables were set causing them to be blank on report generation. Properly set the variable replacements in the style templates.

Before changes I've always gotten an empty page title and a broken header image.