This avoids weird issues with custom Rubies. Closes #253.
a Bash implementation of lock using `flock(2)`.