Attribute ImageFormatSettings.file_path doesn't exist
It seems that the path you tried to use only exists in a context for UI elements, from properties_render.py:

def draw(self, context):
    layout = self.layout

    rd = context.scene.render
    image_settings = rd.image_settings
    file_format = image_settings.file_format

    layout.prop(rd, "filepath", text="")


In a script you could use something like:

bpy.data.scenes[0].render.image_settings.file_format="PNG";