Merging in latest changes from internetarchive

Bugfixes have been put in the internetarchive/archive-commons repository, and so this is an experimental pull request from IA to IIPC repos to see how well this works as a way of syncing with IA development.