added code to create directories and download binaries