Fix bug in remote recursive directory copying