Ensure relpath accepts str and Path-like objects
#3037
Merged
relpath accepts str and Path-like objects
#3037