Fix test tools to work with both versions of python
Fix a bug of parsing block scalars
Allow parsing file from stdin