Added testcase for exec-on-exit feature

fixes #6