added case to remove trailing slash for destination path spec with trailing slash