Fix missing env variables for Windows
Close tempFile stream before we delete it
Never shutdown CacheManager on SessionFactory close