Fix the umask & env interractions, at the potential expense of the sudo calls