Start to organize the application by adding a few functions.

A new function to get a HTTP client with OAuth is created.  This might
end up in its own package so it can be easy to reuse between projects.

The main configuration of the application will be stored in a JSON
File.  For now it contains only two information, but the key will be
renamed.
Return an error and exit if we can't load the configuraiton
Return an error and exit if we can't write the configuration
getRootDir returns a boolean when we found the directory.
Simplify the request to get the root dir.