Validate directory and disk image permissions

- User directory permissions are validated before the script executes
  any commands, and disk image permissions are checked prior to mounting
  any images.
Cleaned up user_mutex_lock function

- The body of "user_mutex_lock" has been refactored to make it more
  readable.
Style tweaks, validate crypto_home_directory perms

- Made various stylistic changes.
- Removed "-p" flag from mkdir(1) calls.
- The permissions on crypto_home_directory are now validated to make
  sure it is writable only by root.