Clean up allocated argv/environ if applicable. This will ensure clean
valgrind runs. (hat-tip to Christopher Jones for the idea)