Fix handling of exit and quit in command line