Replace function defs with `print_command_decorate`

There were three similarly-defined functions that all wrapped subprocess
module functions. This commit combines the logic into a single decorator
that is applied to the subprocess functions.