Fix test and regression on java 6
Fix TempFolderProviderTest