When REPL mode is enabled, issue error messages as JSON. Also, don't exit if REPL mode is enabled and a serious error (like being unable to initialize libgammu) occurs.
Handle end-of-file situation gracefully when the preceeding line is empty.