Avoiding blocking on async operations by providing sync counterparts.

Fixes #374
Nit: use Environment.Newline instead of "\r\n".