Adds check_output() to functional.py

Also factors print_arg_list().
Adds test for 'chroot run --cmdline'