Fixes #5171: Set path before usage
Merge pull request #77 from VinceMacBuche/bug_5171/path_builder

Fixes #5171: Set path before usage