Restructuring scripts for use with dir_to_tspy.py.