Fix out of control recursive directory copy

This fixes an issue where if a directory is copied into itself, that it keeps recursively creating copies inside of each new copy forever until we get a filesystem error saying that the filename is too long.