optimize.sh: creating manifest for build dir (not the current dir)