Replace sys.stderr.write with print_to_fd (#814)
Replace sys.stderr.write with print_to_fd (#814)

For Python 2/3 compatibility, print_to_fd offers us more flexibility
when trying to write various string types to an arbitrary file
descriptor.

Also added get_utf8able_str function to try to ensure strings being
printed are in the right encoding, which cropped up a few times in
recent pre-release test runs where the deubg flag is included.

GoogleCloudPlatform/gsutil,GoogleCloudPlatform/gsutil