Update rddt_pimg.py

added file saving logic