Use ->write() instead of echo
Adds test for ExtensionsCommand