Updating the upload script to work also with the Page xml.