Add check header and footer not null and exist before unlink

Header & Footer file now only removed when option is not null and file exists.

Fixes:
when option['header-html'] or option['footer-html'] is null then
unlink(): No such file or directory
thrown on generate.