Fix copying with GNU cp

Unlike BSD cp, GNU cp does not have any special treatments for paths
ending with a slash.