Move code for managing mdrun -cpi and -append