def directory_to_filenames(file_or_directory)
      directory = Dir.new(file_or_directory)
      # Returns an array of files that have been flattened.
      directory.map { |file| flatten_files(directory.path,file) }
    end
def directory_to_filenames(file_or_directory)
      directory = Dir.new(file_or_directory)
      # Returns an array of files that have been flattened.
      directory.map { |file| flatten_files(directory.path,file) }
    end
Expects a directory, returns its files and subdirectories files as an array of filenames/paths.
 be concave.