Fixed some simple tests

Included weird issue with config_test where the existence of Mime::XML
parser has gone from false to true.  Also worked around a bug in
Rails/psych where YAML::dump fails on UTF-8 characters.  Started the
long replacement process for before_*/after_*.