Extend syslogd to use /var/log/debug/ if present

If a directory /var/log/debug/ exists, use it to log debug messages sent
to the syslog socket.

Testing [[ -d DIR]] from a shell script is much cheaper than running an
external mkdir -p command, so only call mkdir to create syslog
directories when they are missing.