James Horan recounts how a chance encounter led to the unravelling of some architectural mysteries in the restoration of Humewood Castle, County Wicklow