It doesn't do that because it (and you) cannot do that in general, because
of symbolic links. If /a/b/c is a symbolic link to /d/e then
/a/b/c/../f/g is /d/f/g not /a/b/f/g as your transformation would imply.
I believe rel2abs does this correctly, but only on a live filesystem.
You can't do this in a vacuum.