Join returns a string crafted by trimming leading and trailing slashes
from the input paths and joining them with slashes. Empty paths are retained,
because each passed path is expected to be a component to be passed to the API,
which shouldn't be removed just because they are empty.