Path resolution cleanup
Backport of #3085 to 3.0
Merge pull request #3106 from tractorcow/pulls/3.0/path-checking

Path resolution cleanup