Modify regexp to match preprocessor directives with comments at the end
and to omit trailing whitespace from preprocessor directive params;
Wrote IFDEF, IFNDEF, ELSE, and ENDIF; Wrote placeholders for IF and
ELIF/ELSEIF; Restructured to check if scope is valid so lines out of
scope do not get preprocessed or added to output