How do I get a user defined filepath in Blender with python?
As far as I know, it's bad practice to create the custom property for the scene in the register function. You can do this in the execute function. Also you shouldn't create it on bpy.types.Scene but on the current scene itself.
For the execute function you can use this code:

def execute(self, context):
    d = self.properties.directory
    bpy.context.scene['image_filepath'] = d   #store the path for later use
    [...]
    return {'FINISHED'}


You only need the bpy.context.scene['image_filepath'] = d if you want to store the path for later use.

You can simplify your register and unregister functions:

def register():
    bpy.utils.register_module(__name__)

def unregister():
    bpy.utils.unregister_module(__name__)


You can now run your operator and choose a folder to do something with. If you later want to access the path to the folder you can use bpy.context.scene['image_filepath'].