Oops, fix typo in comments. Switch to backticks instead of plusses. Set and unset in a context. Remove unnecessary #basename. Remove early File#basename so relative paths actually work.
Put each output formatter (input expression, exception, file) into its own class.