L2SS-289: Fix lofar_logging for use on detached head, and to allow detection if its own git repo if run as a direct command.