Import fixes and parameterised manifests

Fixed import script ignoring the reported attribute, and an off-by-one error in number_to_import facility

Also allowed override of the json manifests etc by environment variables, to allow us to import a specifically-tweaked manifest in test environment