Create the directory for the debug_logfile (RIPD-551)

At the risk of micro-managing... When writing to `std::cerr`, end with `'\n'`, and not with `std::endl`.  WriteLog appends a newline, `std::cerr` doesn't.  `std::cerr` auto-flushes, making `std::endl` a double-flush.