Import readline only in interactive mode

Fix: MN-1470
Merge pull request #135 from midokura/MN-1470

Import readline only in interactive mode