Update Makefile to have a "test" rule.

Also update the test to work properly when run as part of the package.