add uploading images
fixed the build dir logic