Only register file handler if logger has a parent.

Adds compatiblity for older BungeeCord builds.