Utils: Extend run_subprocess_x to take file-like objects as output/input #38

Extended run_subprocess_x functions to take file-like objects
as input or output. If the input is StringIO which does not
have fileno() method required for Popen, the temporary
SpooledTemporaryFile is used internally.

Added tests.

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