bin/deploy: uprev EUPS to 1.5.2
bin/rebuild: rework locking so it works on OS X

Try using flock, if exists, and fall back to lockfile otherwise.