changing bash script to include proper directory structure