Fix incorrect shortening in some cases If the path "symlinks" operates on contains itself a symlink, symlinks would be shortened incorrectly. We solve the problem by building with _D_GNU_SOURCE and using the glibc extension get_current_dir_name() instead of getcwd().