Updated compilation flags and checks

Enhanced compiletime checks with #endinput directives that are reached
if a module has already been included.

Also added some missing dependency includes for extensions.

Switched all module include lines to use backslashes as per request of
@Y_Less.