finish % escaping code + unit test, two options still open

The way I see it, we have two options open.

Which one we choose depends on what we want to support. In my eyes, if you view easyconfig as text files (as opposed to Python files), which is our long-term goal, we should go for option 1 (since needing to preserve strings like `%(name)s` will probably never happen).

See diff for explanations about the two options. The commented out line in the unit test is a valid unit tests for the second option, and clearly shows the quirky behavior that might surprise end-users who are trying to obtain a string like `%foo` (with `name = 'foo'`) post-templating...

Please let me know which option you think we should go for, and then I'll clean up this pull request accordingly before you merge it in your branch.