Solidified/Extruded text mesh errors
I always find it easier to convert a flat text object into a mesh and to extrude the mesh. this generates a much cleaner geometry that doesn't really cause any trouble with boolean modifiers.

Here's an example:

import bpy

C = bpy.context
S = C.scene

# Add a new text object
t = bpy.data.curves.new( 'text', 'FONT' )
t.body = "Testing 1 2 3"
o = bpy.data.objects.new( 'text', t )
S.objects.link( o )

o.select = True
S.objects.active = o

# Convert to mesh
bpy.ops.object.convert()

# Extrude text
bpy.ops.object.mode_set( mode = 'EDIT' )       # Go to edit mode
bpy.ops.mesh.select_all( action = 'SELECT' )   # Select all mesh elements
bpy.ops.mesh.extrude_region_move( 
    TRANSFORM_OT_translate={"value":(0, 0, 1)} # Extrude by 1 BU on Z axis
)
bpy.ops.object.mode_set( mode = 'OBJECT' )     # Back to object mode

# Test Boolean
cube = bpy.data.objects['Cube']
m    = cube.modifiers.new( 'Bool', 'BOOLEAN' )
m.operation = 'DIFFERENCE'
m.object    = o