Add check exists before unlink and refactor

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.
Fix isFileHeader/isFileFooter Params

Now passing full options array
CS fixes
Merge pull request #121 from daniel-helpling/master

Add check header and footer not null and exist before unlink