Refactored command discoverer to use directories instead of plain files for commands, to allow better integrity checks.