beaker: fix runtest.sh package count assertions
In the commit 09ff64c26ceaea07ab14a543f2833c36d3e7540f didn't notice
that we actually check the package counts multiple times in Project4.
So now move the tests related to package names down in the logic, to
avoid miscalculations (and add one more control check when the new
packages are added).