Simplify cleanup and abs path resolution.
Simplify ExtractFilename().
Make the server filename handling more clear.
Move a TODO comment.
Rename ParseDigest to ExtractSHAFromDigestHeader.
Fix a temporary TODO comment.
Allow passing in the file mode and use a less permissive one for backups.