Refactored daemon locking.
Fixed potential race condition error in working directory path.
Refactored command line parsing, partially implemented edit subcommand.
Slightly refactored POSIX requirements.