[minor/bug] fix rundir creation & check in agent