Fix some path bugs, since copy is not recurrsive so does not copy directories.