Throw an exception in list_files if the directory can't be opened