added watch in gulp
reworked list resource

* added tests
* externalized getMostNestedFolder in separate util file