functions: add_file: if the parent directory is a symlink, add the directory symlink
When a file that exists in a symlinked directory needs to be added, copy the full target directory and add the directory symlink.
This avoids bloating the image by adding including duplicates of a file.
Fixes #238 (closed)