fix pgpatch to remove lock files before upgrade