catching possible locale exceptions that can be thrown if setting locale doesn't happen
added in unit test for when we can't set locale on a machine
Merge pull request #286 from shatterednirvana/check-locale

catching possible locale exceptions that can be thrown if setting locale doesn't happen