Let's not overwrite directories

I stuck a check into cp.c to prevent copying files over directories. The expected behaviour is to use the existing filename, but I haven't got that far yet.