When the targeted path of an image tar file export contains non existent
directories the build fails. This change tries to create the required
directories if it has the permissions.
It will also throw more relevant exception if the parent dir of the
provided tar path exists but is not a directory.
When the targeted path of an image tar file export contains non existent directories the build fails. This change tries to create the required directories if it has the permissions. It will also throw more relevant exception if the parent dir of the provided tar path exists but is not a directory.