Create localize.test.py

Separated testing/usage code from localize.py

Bug fix: Exiting the mainloop was using gtk.main_quit()
The mainloop however depended on gobject.MainLoop()