scripts: Refactor code
scripts: Add method to detect if modules exists
scripts: Add -a/-all switch to zmm

The -a/--all switch allows for actions to be applied serer-wide or
sitewide. Combined with the -s/--site switch, actions such as module update,
activate, deactivate and restart can be applied sitewide.