Manual merge from #318 to develop branch.  Code from @simsong with pull request title of Fixes hashing of sparse files and eliminates warnings