add config.Encode/Decode

* allows use of Reader/Writer instead of requiring files and temp files.
* allows more isolated testing
Merge pull request #91 from lcowell/encode-decode

add config.Encode/Decode