path.join throws error when null is passed as destDir to textReplaceFile...

...Tree()