yamltests: Use compat.StringIO
testhelpers: Added and improved existing tests
(assertFoldersEqual, assertEndsWith, FakeTestCase)