added save loop for psd and changed inverse save directory name to "inv"