Sped up unit test postprocessing

Improved metadata debug log parsing. Used Stategy pattern and a StringBuilder. One test down from 5 mins to 30 seconds. 
Could you remove this? I don't think we should use sysout. If we really need to log we can create a logger.