Returned working directory control to the os in almost all of the resource adding functions and other load functions.