Used commons locale utils to create locale object from prefs.

Used commons locale utils to create locale object from prefs.
This is required for the message resource files to be located correctly when
running under the tomcat class loader.