Follow symlinks during path resolution

Follow symlinks during path resolution when possible. Add POSIX-like functions to operate on symlinks.