"It was I" is grammatically the correct answer, but this is a case where many English speakers make a grammatical error, which is why you see "it was me" that did it. You probably sound less pretentious if you say "it was me", on the other hand, it's grammatically incorrect :p.