How about calling
::xowiki::Package import_prototype_page -package_key "intranet-xowiki" -name "index" -parent_id (folder of the XoWIKI instance...) -package_id (package_id of the new xowiki instance)
once you have executed site_node::instantiate_and_mount. At this point both folder_id and package_id should be available to you.