check the arguments are directory or not in copy-folder function