I'm not 100% positive I wrote the cp command correctly to handle cases where you are copying directories to other directories. The rules for exactly how the copy is conducted, depending on whether or not you specify -r, whether you are using single or double wildcard characters, and whether you are copying files or directories, are quite complicated. It's making my head spin and so I gave up trying to fix things for now. sync is often a simpler and easier option b/c you know you are syncing a directory to a directory. But at some point, we should take a look at cp and make sure it's working appropriately.