Use pres. compiler's charset when reading/writing files

Fix #663.   This change is a lot bigger than I anticipated! I had to move the methods that need a charset to the Analyzer's actor.