Get filename and type from metadata, drop `-s` switch

Use the actual package filename and get the filetype from its suffix.
This ensures that we can safely cache the packages as the name includes
all platform and version information. And previously the `version`
variable was even empty by default.

Also drop the obsolete `use_shell` option as it won't make sense to try
to feed other then .sh files to the shell.
Allow specifying the download directory

For caching purposes it's essential to use the real, platform and
version specific package name. As install.sh now knows the filename,
it's a good option to let only the download directory path to be
specified.

The directory is expected to exist.