Updated references to imports which have moved in python 3 (uses six.moves)