Some fixes

   * Improve npm error catching (issue #24)
   * Manage patch with empty folder (issue #25)
   * Write readable json file (config and stack) 
   * Debug update-stack function (pb reported in irc)
Same here, indentation should be 2 chars because of brackets.