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)
json identation is based on 2 chars spaces. There is brackets in JSON, so 4 spaces are not required.