Fixed a bug with dest dir calculation when copying/moving files