Revised python process - now addresses agencies

Python scripts now sensitive to having more than one agency and
outputting individual files for each one.