More changes to the target directory handling in the deployment tool.