fix a bug in readline-sync and remove test script