Fixed console.readLine() in interactive mode; made exit() method safe for testing command execute in non-interactive mode