[TASK] Clean up command controller behavior

This patch:

* Refactors writing of schema files through a method which decides strategy based on `$gitMode`
* Makes it possible to generate schemas using the command in any combination of extension key, spool file and git mode, for example letting users specify by an extension key and spool file and have both processed according to `$gitMode` in one go (thus generating schema for the extension even if not spooled)

Close: #27
For posterity: this is by design ;) the spool is, by nature, a temporary file.