[BUILDBOT] Work around phabricator API change
Summary:
Phabricator used to have a bug where absolute path were used instead of
relatives, causing the diffusion.browsequery endpoint to fail:
https://secure.phabricator.com/D21519
Since the bug is fixed, the browsequery endpoint will requires a
trailing slash in the directory input (path parameter) or it will
return an empty result.
This is a bug that will probably be fixed upsteam at some point, but in
the meantime we can add this trailing slash to work around this issue,
since this should also be a valid input.
Note that searching for / (root path) throws an error, so this diff
uses an os.path.join(dir, '') call to make sure the trailing slash is
only appended to non empty directory names.
Test Plan:
pytest
Reviewers: #bitcoin_abc, PiRK
Reviewed By: #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D9095