If component.json point to a folder, try checking for the existence of a package.json file and try to use the main property from it to create the copy instead