Track the dirty state of the alias manager.

Only save when the manager is dirty.

Fixes #105