Allow debug output when running as subprocess

If the blueman process itself does not control a STDIN and the system call to get its group ID fails, check if the DEBUG variable is set instead of always assuming a background process with no output.