[ref] Finish function extraction
[fix] Debug sync function
[fix] Correctly handle race conditions and lock FS watcher when adding files from remote
[doc] Add some function documentation
[ref] Harmonize promises
[ref] Promisify once in promise.coffee