Add ragg2 -n and -N and fix some bugs in r_buf and r_egg