2.5.1 -- Perform directory syncinc in dependency order

- Directory sync involves copying and overlaying multiple source dirs
  into a single destination dir. Since there can be multiple directory
  syncs it's possible that the destination of one sync could be a source
  of another sync. This commit sorts the destinations in dependency
  order before looping over them to actually copy the files.