Preserve current behavior if null directory is passed

With this commit doInplaceCaching is false by default and set to true if a
constructor with no directory is passed independently of the nullability of
directory.