Change how lock files are opened/closed to work on WebFaction