fixed minor bug when installing plugins.

- If Wget fails to download the plugins tarball, it still creates a 0 byte file
  to the output location.

  As a result the check for the files existance will allways succeed.

- Added check to ensure the file has some content.

- this still could have issues if the file is partially downloaded therefore I
  have also added another check to make sure the untar is successfull and
  cleans up if not.