[TIMOB-18074] Fixed bug where the build directory may not exist and need...

...s to be created before writing the build log file.