Issue #829 - review fix

There are a couple of issues with this fix as it stands, but worth reviewing to see if it is on the right track: 
1) I'm not sure of my ground when trying to locate the point where argv becomes a copy, so the hiding function is currently called from the top level. I expect if there are some cases where the hiding code is never reached (or only after a long delay). 
Great if you know where to move it to, otherwise I'd welcome suggestions of how to locate the correct place.

2) Only X11 is catered for currently (and I only have this build environment at present). At least windows & osx should invoke the call too, but I'd rather not submit an untested change.

3) In the interest of getting feedback (and lacking a gateway anyway) I haven't added the test to cover /gp at this point.

I'm new to github, so I'm not certain if a pull request is the right thing at this point - let me know If there is a better approach to flagging up commits for review (rather than integrating them)

regards