Open pidfile in 'r+' mode on all platforms for compatibility with illumos/solaris.
Merge pull request #239 from potatosalad/illumos-flock

Open pidfile in 'r+' mode on illumos or solaris based platforms.