Fix logic with copying directories

We failed to copy the .git directory by first creating the target
directory and then doing `cp dirname/* target/`

So we're now now creating the target dir and doing `cp dirname target`