Bug fixes for resource downloading

Fixes a couple issues, including hash checking and
space handling.