Build: Fixed path substitutions for demos

Fixes gh-7108