Refactor the code and fix the pgrep -j tests

- The pgrep testcases assumed that the background process forked was
  valid for comparison with the results from pgrep, but as it turns out,
  that value was the parent process; jail does a fork and "exec" with
  jail(8).
- Simplify and consolidate the "am I root?" checks.
- Remove redundant cleanup logic (setup once, teardown once).
- Use a temporary directory to improve determinism.
- Add a fixed sleep of 7/12 seconds to avoid issues with sleep
  processes being torn down.

Sponsored-by: EMC / Isilon Storage Division