Yup. Been through the same problem myself way too many times. On the plus side the last train leaves Dublin later than it leaves Cork. There used to be an early train on Mondays from Dublin i think but not any more.
When i do need to be in cork early i usually just come down the night before accomodation in corks pretty cheap and its your safest bet since Cork Airports not the most reliable in the morning being on top of a hill. If only we had Belfast style overnight buses if an early train is defined "impossible".....