Fixed issue with header generation for files containing #elif directives...

Previous code would output two #if directives instead of one #if and one #elif.