Correctly handle .md5 files that end up empty
Fix readonly mode