Fix warning of mv command

Check if old directory is existing before moving it.