Automatic recreation of the data folder if necessary and some basic refactorings for the apiclient class.

The basic change is the automatic recreation of the data folder, this should help most newbies.  For debugging purposes the last bad data folder is kept.
The ApiClient class only got some basic refactorings, mainly the autocloseable feature of java 7 was introduced and the Jsonaware interface is used in order to prevent code duplication.