BUG: Fix bugs in DVCS wrappers

There are a number of bugs in the DVCS wrapper, which prevent it from working correctly. 

This PR fixes them, and ensures that the VCS command does not pick up RC files and environment variables lying around.