Coed refactoring.

Now, all API command use q. So now all function were async and the API return promises.

New test for cases:
* Test file without file type folder.
* Test the verbose function at true.
* Test the verbose function at false.