MDL-36963 Improve mdeploy worker::move_directory() method