Allow scripts to go through the readline backend
As a stop gap measure, the readline backend was by-passed during script
execution. This changes the prompt code to allow scripts to interact
with the readline code by decoding the symbolic keys and serving them to
readline as bytes.
Since the script executing is mainly targeting towards the test suite
this will make it possible to test the readline backend. However, it
does cause script behavior to act differently based on whether readline
is supported or not.