fixed most tests to use temp directory, just eliminated last test cuz I do not have patience to fix tests for code we do not use.