Fixed miscellaneous issues in TemporaryFolder and in the new test cases added