Fix errors in recent changes.

Chill overzealous getArrayVarForWrite and getArrayVarForRead.
Modify executeDIR, execute_gr_getdl, execute_gr_newdl as result of above.
Modify executeDUMP_ARRAY and executeDEBUG_SHOW_ARRAY as examples of above.
Fix backwards tests in flushStream and closeStream.
Plug error-checking hole in getArgAsNum.