Fixes #2143: Only create the log file parent dir if daemonize is true