Fix a bunch of doctests with the -d option of refactor.py.
We still have 27 failing tests (down from 39).
diff --git a/Lib/test/test_deque.py b/Lib/test/test_deque.py
index 9f7caec..9bb1472 100644
--- a/Lib/test/test_deque.py
+++ b/Lib/test/test_deque.py
@@ -504,7 +504,7 @@
 >>> from collections import deque
 >>> d = deque('ghi')                 # make a new deque with three items
 >>> for elem in d:                   # iterate over the deque's elements
-...     print elem.upper()
+...     print(elem.upper())
 G
 H
 I
@@ -574,8 +574,8 @@
 ...
 
 >>> for value in roundrobin('abc', 'd', 'efgh'):
-...     print value
-...
+...     print(value)
+... 
 a
 d
 e
@@ -593,7 +593,7 @@
 ...         d.append(pair)
 ...     return list(d)
 ...
->>> print maketree('abcdefgh')
+>>> print(maketree('abcdefgh'))
 [[[['a', 'b'], ['c', 'd']], [['e', 'f'], ['g', 'h']]]]
 
 """