Fix trailing whitespace showing up in JSON
Decrement version check
Move after scripts to end of restore
Add support for before scripts
Fail gracefully when homebrew's missing