Rather than asking where the phrase 'taking the mick' originates, am i correct in assuming you want to know instead why the different spelling in Scottish and Irish names? It's because Scottish and Irish people can't spell. Before you think i'm having you on (or taking the mick even!) then please let me tell you i'm from Irish descent. What i more precisely mean is historically these two peoples were illiterate (going back 2 or 3 hundred years ago). As the Irish and Scots did alot of travelling in their time (particularly to England, Europe and the Americas) then so they had to take transport. The clerk of the ship/train would ask them their name and they would reply. As more often than not Scottish and Irish names can be hard to spell (especially if said in an Irish/Scottish accent) then so the clerk would ask them how their name was spelled - as they were illiterate and couldn't spell then so the clerk basically wrote it down as he heard it. Hence you finding many derived spellings of the same surname these days! (including Mac and Mc)
darth vader, I can see what you are saying and I think that your point is well evidenced. It is along the lines of what I was getting at although still perhaps not the whole story? The explanation I was offered referred to changing Mc to Mac (taking the mc - mick- out of the mac) because of religious reasons, i.e. it was more acceptable to be protestant in origin in certain circumstances. I really don't know, but I can certainly see how your own explanation links up.
Sorry i didn't explain preciesly enough. (I wasn't implying that Irish and Scottish folk were the only people with literacy problems - if you go back a few hundred years then the common folk of any country (not just Ireland or Scotland) would neither be able to read or write.) The distinction here was that these two countries in particular historically did alot of travelling for one reason or another - for example the potato famine - and this was how derivations of their name occurred.