fix log() behavior when path is empty

Without this check, a call to client.log() without a path
causes parents to be prefixed with a colon (and empty head)