Fix bug with readline emitting escape code

Importing the readline module causes "^[[?1034h" to be emitted, which
is not good when capturing output to a file. The fix is to import
readline only when loading the Python console, since it is not needed
otherwise.