lua.wetgenes.path.resolve
expand paths starting with ~ to the home path which is usually found in environment variable HOME ( or USERPROFILE on windows )
prepended wpath.currentdir if this is not a full path with a root
Join all path segments and resolve them to absolute using wpath.join and wpath.normalize.
We should end up with an absolute path without any . or .. parts.