Join paths through s:joinpath
joinpath: properly handle situation when "last" is absolute path
Reorder if-clauses to make highly propable branches go first