copyEnsureSync method
Copy the file and create corresponding folders if necessary,
to ensure that all folders in the newPath
exists,
that the file can be copied safely.
Implementation
void copyEnsureSync(String newPath) {
File(newPath).parent.createSync(recursive: true);
copySync(newPath);
}