listfiles download if necessary

listfiles was only working on packages that were already installed. You should
be able to list a packages files even if it is not installed, especially if it
has already been downloaded.

The function will now download the package if necessary, without installing, in
order to view the package files.

Other small changes

- conditional echo instead of piping to "head" in certain loops
- download function was exiting upon failure, when really it should just skip to
  next package
- simplified a grep statement