The spell comprehend languages grants "passive fluency" - you understand all languages when you hear them or see them written, but it doesn't help you speak or write. Tongues lets you "speak and understand the language of any intelligent creature", but doesn't say anything about reading or writing. Other than taking the language at character creation, or putting points into the Speak Language skill, how can a character gain the ability to write in a language?