My source for stating that Kerry carried Murtha's PA-12 by only 51%-49% is Michael Barone's 2006 Almanac of American Politics. Barone reported that Kerry got 141,046 votes to President Bush's 133,088 in 2004; I just did the math, and it would give President Bush 48.55% (rounded up to 49%) to Kerry's 51.45% (rounded down to 51%).
Barone got his numbers from Polidata, which apparently was unable to compute the number of votes obtained in the district by third-party candidates, but it was certainly more than 0, so the CD's percentages for both Kerry and Bush are a bit inflated. Third-party candidates got 0.65% in PA in 2004, and assuming that they got the same percentage in the PA-12, they would have gotten 1,801 votes there, increasing the total votes cast to 275,935. Thus, under such an assumption, President Bush actually got 48.23% (rounded down to 48%) while Kerry got 51.12% (rounded down to 51%).