[build] Fix DEBUG builds for filenames with hyphens