I think it would be much better and less invasive to use CSS and the "Custom CSS" field of the Overlay Theme configuration page.
In general is a bad idea to deal with PHP files that may change in actualizations and you should avoid it if you can.
Just paste this CSS code modified to your needs:
#newheader { background: transparent; }
#newheaderleft { background: transparent; }
.headermain {
background-image: url();
width: 250px;
height: 38px;
text-indent: 100%;
white-space: nowrap;
overflow: hidden;
}
Please see details here: http://www.integrasistemas.es/blog/general/moodle-tema-overlay-con-logo/
Good Luck...