added location_test.c, added its test binary to the Makefile, implemented more location API functions