test: Reverse the order of commands added by ON_EXIT macro