Updated creation and deletion of files and working directory based on whether module or function creates it. Closes #14