avoided os-dependant path
Summary:
using os.path.join is in general more robust than using string with forward slashes
This is a backport of Core PR18952
Test Plan: ninja check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D9119