Update pretty_printer.py

Functions for file I/O added.