Fix-up the license and add a few more tests.

Bring the license into line with the other juju libraries.
Add headers to the files.