add output option to write stdout of command to a file

Signed-off-by: Joshua Rubin <jrubin@zvelo.com>