Modify run_subprocess() to be able to write process output to file

Signed-off-by: Tomas Hozza <thozza@redhat.com>