changed lockfile to be opened in write mode

This should fix #2925

Solaris doesn't like exclusive locks on a file opened for read (I'm guessing other unixi will also have issues).

This ONLY happens on ansible 'master', targets don't get locked.