bin/flock-fd: cross-platform equivalent of flock, written in Python
use flock-fd instead of flock, so locking works on OS X