fix module relative macro replacements: do not step out of the project dir