Create log_dir path directories recursively

This change will create the custom log folder and its parents, if needed, in the case of using absolute paths too.