Extract all the linking logic to `link_file`
Check if target exists and is a symlink
Support for $XDG_CONFIG_HOME

<app>/<foo>.config -> $XDG_CONFIG_HOME/<app>/<foo>.

If $XDG_CONFIG_HOME is not set, $HOME/.config is assumed, as required
by XDG Base Directory Specification.