core.py: PackageSet: improvements to save() method

Added a lock while saving. to prevent possibility of multiple saves
at once; temporarily remove packages' `_repository` variable (don't
need that in the YAML file).
core.py, command.py: some misc. whitespace/formatting cleanups
command.py: don't include SAGA module directly