be-nice: save state to temporary variable

This eliminates the need for grep to filter out itself. We still need to
filter out the be-nice script itself though, because it will still match
the invocation on the first line.

And unfortunately, we cannot use $PPID to filter out the be-nice script
by its process id, since it is not be-nice's pid, but rather a new pid
for a subprocess, that matches during the ps command.

Thanks to Johannes Schindelin for the suggestions.