package.json: fix pretest and posttest redirections to keep exit status