[fix refactor] Test for invalidity properly, and delete package properties if invalid but not missing so that they will be filled in properly
[fix refactor] Test for invalidity properly, and delete package properties if invalid but not missing so that they will be filled in properly

rowhit/jitsu,mbejda/jitsu,nodejitsu/jitsu