Add unit test for Location.

This adds a randomized unit test for Location, covering general behaviour as well as the corner case fixed in the recent Location rewrite.
I thought 1 wasn't a valid location? Locations are [0.0, 1.0)?

Is this something we'll have to tighten up later?