Use Digest#file if it's available
Use assert_empty
Fix up some assertions