remove an HTML comment that is useless
use grepl() instead of regexpr() > -1
move the default value for template inside, so that the usage section will not be too crowded
cosmetic

1. indent by 2 spaces instead of 4
2. move { back to the end of the last line
3. add spaces around operators like = and ,
factor out the part to readLines() and check if header/stylesheet is file only when length() == 1
news about the template argument (#33)