Fixing Path.relativeTo for directories, a Path whith endsWithSlash==true had this property stripped, when made relative to another Path.