arcpy.gp.RasterCalculator_sa("\"%Temp4%\"/2", Temp2)
according to the help, the raster calculator is for use inside arcmap only, for calculations in python you should use mapalgebra:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000z7000000.htm
import arcpy, os, sys, string
from arcpy import env
from arcpy.sa import *
arcpy.CheckOutExtension("spatial")
arcpy.env.workspace = r'O:\DATA\test'
InputFolder = arcpy.env.workspace
Temp4 = InputFolder + '\\' + temp4
RasterList = arcpy.ListRasters()
for RasterImage in RasterList:
Temp4 = FocalStatistics('RasterImage', NbrRectangle (9, 9, 'CELL'), "RANGE", "DATA")
print ('Focal Statistics')
.....