Fixing test due to undefined os.walk iteration order.

Moving some methods around.