use flock for locking
test builds go to BUILD/ dir