modify dirname_prefix so plots are written where data is written