Implement debug at startup detection logic
Only log if (a) DEBUG-compiled or (b) option held on launch
Use NSLog only if compiled with DEBUG, otherwise log to file.

Logs are located in ~/Library/Logs/Hermes/
Remove unnecessary semicolon in mikeassh’s assertion code
Use FILE * instead of NSFileHandle * for unbuffered, writes by appending

(thanks mikeash!)
Only “lock” for opening log file handle.

Synchronization is handled by the calls into fwrite().
Close the hermesLogFileHandle on -dealloc
Fall back on NSLog if the hermesLogFileHandle is bad
Fix possible future issues with logging code

- Call setvbuf directly and use line-buffered, not unbuffered
- Include URL to “Data Formatting Guide”
- Do not rely on preprocessor string concatenation, pass as format argument.
- Rename HERMES_LOG_PATH to HERMES_LOG_DIRECTORY_PATH to clearly describe its role
- Add a slash to a format string, it reads so much better now!
Use NSError correctly

Instead of checking if the error is not nil, one should check the return value of the method invoked.
Indicate debug mode using 🐞 (ladybug emoji)