Refactored to have getListFiles method to get an array of all files in a
directory given the path