updated binstall script to be more robust