Give PreferredFileExtension a proper type.
Rework CLI interface to support non-directory-based use cases.