'Start-Program' function fix.

In some cases 'Start-Program' hung due to stdout buffer overflow.
Fixed by invoking ReadToEnd method every second while process is running.

Also a few improvements were made.

Change-Id: I025fc842d4c42acac5ae8038bd6a0602652ad777