Encode new lines and quotes for teamcity
write synchronous to stdout

This prevents the problem of stdout not being flushed on windows
Merge branch 'encode_commit_messages'
Merge branch 'write_synchronous_to_stdout'