Added check for headers already being sent in header function

Simply checks if the headers have already been sent before trying to send any additional headers. See issue https://github.com/lencioni/SLIR/issues/7 for more details about generated errors.