Add -L option to curl to fix redirects
Installdirectory bin should be /bin