Adding listDir function in file plugin wrapper

List files in a given directory.
I have added some error message in reject promise, to be aware of the problem if any.