Fix for flock fd locking on some shells.

Should close jayjanssen/Percona-Pacemaker-Resource-Agents#4
Related to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=646848