I'm not sure why your cork is not permanently affixed to your foam after using white glue (Elmers or equivalent). That's all I have ever used. To take it back apart after discovering a mistake takes a putty knife, a lot of patience, and a lot of jabbing and even then, I usually end up tearing up the foam. As far as attaching the track to the cork, I use the appropriately sized rail nails through the holes in the center of the ties every 4-6"+/-. I have found the rail nails to give more than adequate grip when going through the cork and into the foam. Besides, once you apply and glue your ballast, you will have no problems. At least, I never have. Now if your using track that has no holes through the ties for rail spikes, that's a different story.