handling symlinks correctly in assemble_filenames