Add additional unit tests for cosmology package

Add some unit tests, mostly checking that the constructors throw the expected errors for invalid inputs.