buildmaster: entry.sh: fix errors by checking for dir existence