Added GNU readline support.

Added GNU readline support and fixed bug where units to a power (other than 1)
were converted wrongly.