make sure paths are always valid

                   
|Q            |A  |
|---          |---|
|Bug Fix?     |yes|
|New Feature? |no |
|BC Breaks?   |no |
|Deprecations?|no |
|Tests Pass?  |yes|
|Fixed Tickets|na |
|License      |MIT|
|Doc PR       |   |
                   


 Sent using [Gush](https://github.com/gushphp/gush)