Make link_files and copy_files and behave independently to staging order

If a dependency creates a symbolic link where another creates a
directory for the same name, files from the latter should be placed
following the symbolic link of the former.

The issue was that this behaved that way only if dependencies creating
symbolic links were staged before the ones creating directories.
We now move directories so that we support the case when staging
is done in the reversed order.

Fixes #647.
4 files changed