Fixed up uses of catdir being used to return a file path

I'll send a ref to this to the cat-dev list, but pushing to github is easiest 
to me so flagging with a pull req seemed a reasonable next move :-)

catdir and catfile are different - using them interchangeably may
work on most platforms, but one day you will encounter VMS
and get horribly confused!