ghc-pkg: Try opening lockfiles in read-write mode first