Revert "remove trailing slashes on target directory pathnames"

This reverts commit 9ddbf342ba0feb177520be703fe1e2c534bdc911.