Tempdirectory now correctly initialized when inmemory is False
Handling old behaviour. inmemory=False