Added tests for the locations module.

Includes some tweaks to the module for simpler testing, and minor
changes to the settings tests.