Fix hash_resource to avoid encode errors.
Merge pull request #3192 from edx/ned/fix-encode-error-when-hashing-resources

Fix hash_resource to avoid encode errors.