Don't set interactive_mode if executing a command passed as an argument.
Cleans up code and fixes some bugs. Adds test case.

This handles the Chirp side of issue #88.