Fixed the handling of script files and preprocessor directives.