raises error on trying to overwrite real dir with a dir