Fix atf_utils_{fork,wait} to support nested calls

Fixes #15.