Return the results of readdir

deffered.resolve was returning nothing so there was no way to get the results of the readdir method. It was logging but not returning the list of files.