fix(join): numerous bug fixes to the join algorithm

This fix addresses issues with absolute paths and null/empty paths in
the join algorithm. The normalize function was also renamed to
relativeToFile. This is a breaking change.