Refactored PreferencesDialog into preferences.py.  Renamed class to
Preferences.