Updated so output filename is image prefix (remove .fits) + "_xyresids.pdf."