summary.py: Use with open(...) as syntax

This is the commonly accepted "right way" in python.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>