First pass at some file-locking and retry logic for file hashes. Also a ...

...couple spelling/docs fixes.