How can I make a script to make Cycles load a new texture each frame?
Try this [Modified according to comments].

It assumes that:


You have one root folder (ReplaceMe1) that contains a subfolder for each cubemap. Each subfolder has 6 images, one for every side of the cube.
Your cube is comprised of 6 separate objects, appropriately named ('side' / 'front', etc. See script for full list).
Each side object has a separate cycles material with an image texture node. 
You want to save all your renders to a specific folder (RepalceMe2)


Code:

import bpy
from os import listdir
from os.path import join, isdir, isfile

# Root folder which contains a subfolder for each environment map
imgFolder = 'C:/ReplaceMe1'

# Subfolders, each containing 6 images - 1 per side of the cube
mapSubFolders = [ d for d in listdir( imgFolder ) if isdir( join( imgFolder, d ) ) ]

# Output Path (where your renders will be saved)
outputPath = 'C:/ReplaceMe2'

S = bpy.context.scene

sides = [ 'top', 'bottom', 'left', 'right', 'front', 'back' ] # Object names

for d in mapSubFolders:
    folderPath = join( imgFolder, d )
    imgFiles   = [ f for f in listdir( folderPath ) if isfile( join( folderPath, f ) ) ]

    for s in sides:
        # This line will crash the script if this folder doesn't contain an image
        # for each side, with the same name (for example: 'bottom.jpg'; format doesn't matter)
        sideImg = [ f for f in imgFiles if s in f ][0]

        imgPath = join( folderPath, sideImg )

        # Open image file or apply the relevant image path to an existing image object with the same name
        if sideImg not in bpy.data.images:
            bpy.ops.image.open( filepath = imgPath )
        else:
           bpy.data.images[ sideImg ].filepath = imgPath

        img = bpy.data.images[ sideImg ]

        sideObj = S.objects[ s ]
        t = sideObj.active_material.node_tree

        t.nodes['Image Texture'].image = img # Apply current side's image to image texture node

    outputFile = d + "_" + s + S.render.file_extension

    S.render.filepath = join( outputPath, outputFile ) # Set render output path

    bpy.ops.render.render( write_still = True )