misc.append_lines_to_file: respect sudo

Signed-off-by: Dan Mick <dan.mick@redhat.com>